Delve into the different types of steps you can use in your DogQ testing scenarios. From simple actions like 'Go to URL' and 'Click element', to advanced steps like 'Find element' and 'Type Into'.
Let's take a look at the different Steps available in DogQ. Step represents the single interaction action with the web page.
By selecting this step, you can choose one of the available Macros for this Project to execute a specific set of steps.
Upon executing this step DogQ will load the page and be ready to interact with its elements.
This step type asserts that a specific page/URL was opened in the previous step.
If the current URL at the moment of the step execution is the same as you provided, this step will pass and fail otherwise.
This step checks the trailing part of the URL, e.g. you can provide the exact string "/projects/1", which will match "https://dogq.io/projects/1".
It might be helpful to check that a URL with a specific ID is opened after one of the previous steps.
This step can also take the RegEx, e.g. "/projects/\d/" will match "https://dogq.io/projects/1", "https://dogq.io/projects/2", etc. Please keep in mind that you should enclose your RegEx into "/". Otherwise DogQ will treat it as a string and try to make the exact comparison.
This step type has two purposes:
- Find a specific element (any tag except input, for this we have a dedicated step) on which you can use the Click element action later to simulate user interaction.
- Find any element by a query and ensure it's displayed, e.g. if a popup or a specific error message appears.
To find elements you can use the following Locators:
This way you can locate elements that contain label value or a specific text within it.
For instance, you can use a button name to click on this button later.
You can search for elements with specific CSS selectors, e.g. "[href="/login"]".
You can look for the element by XPath for complex and precise searches.
Our advice is to use it as the last option as it's less human-readable and maintainable than the searches by Label or CSS.
Use this step to simulate a user clicking on the element found via the Find element step.
Use this step to check that a specific element is not present on a page. In terms of selectors, it operates the same way as Find element with the difference in the output result. If a specified element is not found, the step will pass and fail otherwise.
It behaves the same way as Find element, with the only difference being that it's looking for an "input" element tag so that you can then use a follow-up step called Type into to enter specific text values into input fields.
Use this step to enter a specific text into the input field found at a previous Find input step.
Random Values are particularly useful when it comes to negative tests. Testing validation for various input forms usually requires entering values of certain lengths or containing certain symbols. Also it’s very robust when you need to create multiple entities that have non-duplicate names.
To use this:
- 1.Add Type Into step.
- 2.Type "Random//".
- 3.Insert your regular expression between slash signs.
- 4.In the test your RegEx will be substituted with the corresponding random string.
In this example, we are using a simple RegEx to test the input field validation.
Each time we run this test, DogQ will generate a random 8-character string of letters and digits, which can be seen in the test run report.
You can use this step to validate whether a specific text is present and visible on a page. Foe example, yo can use it when you want to validate that a particular error message appears.
You need to provide the exact text for this step, and if it is present on this page - this step will pass, and it will fail otherwise.
This test step can be helpful when you need to wait for some element to appear on a page or want to check what will happen after a specific time. You need to provide a number in seconds that a test must wait before going to the next step.
Last modified 3d ago