Scenario steps
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'.
Last updated
Was this helpful?
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'.
Last updated
Was this helpful?
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. Learn more
This navigational tool with its two subtypes is used when you need DogQ to either go to a URL or switch between browser tabs.
"Go to URL" step is the beginning of all tests. You specify a URL, e.g., https://dogq.io, and upon executing the test, DogQ will load the page and be ready to interact with its elements.
There might be cases when user interaction leads to a new browser tab being opened and for DogQ to be able to interact with the elements in a new tab it needs to be navigated there first. To use "Go to Tab" simply insert the number of the tab you want to go to.
Numbering starts from 1 and it's where DogQ operates by default. So, if a new tab has been opened and you want to go there, simply type "2" in the value field.
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(the part after the domain), e.g. if you're at "dogq.io/login" you can simply use "login" as step value.
The search is performed from the end of the path backwards, in a right-to-left manner, i.e. if the path you're testing consists of more than one directory and you're particularly interested in the middle one, you still need to specify the path up to the very end. For example, if you're at "docs.dogq.io/use-cases/component-testing" and you want to make sure that the "use-cases" part is still there, you need to use "use-cases/component-testing" as step value.
"Check path" also supports RegEx for paths containing dynamic pieces, e.g. IDs, query strings, etc. In this example we're at "dogq.io/projects/2342" and want to check that a project page with a 4-digit ID has been opened as a result of one of the previous steps.
In this mode "Check path" will try to make a match by a substring regardless of its position in URL, performing the search from the start, in a left-to-right manner, i.e. it checks not just the trailing part of the URL, but the entire URL.
Remember to enclose your RegEx into "/". Otherwise "Check path" will operate in normal mode, trying to make exact match of the value provided, performing the search right-to-left.
Use this step to simulate a user clicking on an element. It has multiple subtypes: Left button, Right button, Double click, Hover, By coordinates, and Drag and drop. Selectors are used to locate elements and interact with them.
Left click is naturally the most common one. It clicks on the element specified via selector, just like a user would click on it with their mouse.
This variant comes in handy when we need to test JavaScripted custom behavior, e.g., custom context menus, tooltips, etc.
As with Right button click, this subtype can be useful for testing element custom behavior implemented with JS.
This subtype simulates a mouse hovering over the specified element.
With this variant, rather than targeting an element by its selector, you can click a point on a page at the specified coordinates. The input here ix “X, Y” coordinates that are calculated starting from the top left corner of the whole page(not the current viewport).
This subtype is used for testing drag-and-drop functionality.
To use it:
add a Find element step and specify a selector for the element you want to drag
add a Click element | Drag and drop step after it and specify a selector for the element where you want to drop the dragged element
Click element will try to perform a click on an element, even if it's hidden or disabled. This is done to ensure that users can cover as many cases as possible.
This step type is used to check that a specific element exists and/or has certain attributes. Oftentimes, It's used to confirm the results of the previous steps.
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.
This is one of the alternative modes of Type into tool in which DogQ will generate randomized non-duplicate test data based on the RegEx provided.
To use this:
add Type Into step
type "Random//"
insert your regular expression between slash signs
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.
Every 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.
There are cases when certain actions, for example a search on a site or an action confirmation, can only be initiated upon pressing Enter key on the keyboard because there's no dedicated button for it in UI. To simulate pressing Enter, simply add Type into step and use KeyEnter as its value.
Sometimes when entering text into a field you may need to break it into lines and paragraphs. To do so, you can simply include the newline character "\n" in your text, This allows you to control where the line breaks occur, effectively creating new lines and separating paragraphs.
In this example we're using two newline characters and here's what the result looks like:
You can use this step to validate whether a specific text is present and visible on a page. For example, you 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.
You can use this step to upload a file (max size 10MB) to the site you're testing.
To use this:
click on the highlighted button in the "Upload file" step
follow a dialog window that poped up and select the file in your system
provide a selector of an input[type="file"] element you want to upload your file to
The file you preload to DogQ will only be used in the corresponding step and will be deleted if the step or Scenario is deleted.
Please, keep in mind that Upload file may not always produce the expected results when used with hidden and/or heavily customized inputs.
With this step you can create a variable, assign a value to it and then plug it in whenever you need that value inside your Scenario. "Set variable" has two fields, the first one is for the variable name. Names can include letters, digits and underscore. The second field takes in a string value or a JavaScript expression (plain JS, without any references to any libraries or frameworks).
To use this:
add "Set variable" step
specify a name for the variable (letters, digits and underscore)
provide a string value or a valid JavaScript expression
when using the variable, preface its name with a dollar sign $
The value should correspond with the step type you will be using the variable with, e.g., if you're using a variable with Click step it should be something that DogQ can use as a selector, if you're plugging it into Go to URL step, the value should be a URL address, etc.
Since cookies are so widespread and in some cases integral to the proper functioning of a website, testing them can become essential. This step enables you to interact with the cookies on your website. Its 6 subtypes include both actions and assertions:
Assigns value to a cookie with the specified name.
Deletes a cookie with the specified name.
Asserts that the cookie with the specified name contains the exact value.
One step interacts with one cookie. If you have multiple cookies to validate, you will have to check them one by one.
Asserts that the cookie with the specified name exists.
Asserts that the cookie with the specfied name doesn't exist.
This variant accepts a comma-separated list of cookies' names and asserts that no other cookies are set, i.e. only the specified cookies exist. If you pass "a,b,c" and upon visiting the website cookies "b,c,d" are set, the step will fail.