Documentation

Scenario Steps

Let's take a look at the different Steps available in DogQ. Step represents the single interaction action with the web page.

Use Macro

By selecting this step, you can choose one of the available Macros for this Project to execute a specific set of steps.

Macro Step Example

Go to URL

This step type is the beginning of your tests. First, you need to specify which page you want to open and interact with by providing a URL, e.g., https://dogq.io.

Upon executing this step, DogQ will load the page and be ready to interact with its elements.

Go to URL Example

Check URL

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.

Check URL Example

Check path

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.

Check path Example

Find text

You can use this step to validate whether a specific text is present and visible on a page. 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.

Find text Example

Find Element

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.

This step should always go before "Click element" step.

To find elements, you can use the following locators:

Label

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.

Find element by Label Example

CSS Selector

You can search for elements with specific CSS selectors, e.g. "div[name='loginbutton"]" or ".fa-desktop".

Find element by CSS Example

XPath

You can look for the element by XPath for complex and precise searches.

You can read more about XPath here.

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.

Find element by XPath Example

Click element

Use this step to simulate a user clicking on the element found via "Find element" step.

Click element Example

Find input

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.

Find input Example

Type into

Use this step to enter a specific text into the input field found at a previous "Find input" step.

Type into Example

Pause

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.

Pause Example

No element

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.