action: open
Action to open specified URL in the current browser window.
Default timeout to open the page is 30s.
An action fails if such a timeout is reached, but a page is still loading.
This action supports extended syntax with two dedicated properties:
- url - URL of the page to open
- timeout - timeout to await page load
- url - URL of the page to open
- timeout - timeout to await page load
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- open: https://example.com
- open:
url: https://example.com
timeout: 15.5s
action: crawler
Action to automatically crawl the website and visit all
links/pages uncovered during automatic navigation.
You can adjust the following settings to control crawler behavior:
- url - entry point for the bot to start automatic crawling.
You can omit this configuration, and the bot should start navigating
from the currently open page.
- domains - list of the domains to allow crawling. The crawler skips
visiting link if its domain isn't in allow list.
You can omit this field, and the default domain will be determined
based on the URL field or the URL of the currently opened page
(in case the URL field is omitted as well).
- randomize - flag controlling the order of links to visit.
Randomization is enabled by default, meaning that when the crawler
decides to visit the next link, it will pick a random one from
the queue of uncovered links. The crawler will visit uncovered links
in natural order if you disable this flag.
The default value is true
- delay - delay to wait before extracting links available on the page
and adding them to the crawling queue. The default value is 5s
- maxVisitsPerUrl - setting controlling how many times the crawler
should visit uncovered link/url. The default value is 1
- maxVisitsOverall - setting controlling how many links should be
visited overall. The default value is 1024
- maxQueueSize - setting controlling the upper bound of how many
links can be available in the crawling queue at any given moment.
The default value is 4096
- maxDuration - the maximum duration of the crawling action.
The default value is 5m
- pageLoadTimeout - timeout to await for any page to be loaded during
crawling action. The default value is 30s
- scriptTimeout - timeout to await for JS script execution extracting
links from the currently opened page. The default value is 30s
- linksExtractorScript - JS script to extract links/URLs available
for crawling from the currently opened page.
This script is executed on every visited page to add new items
into the crawling queue. The default script is below.
- scroll - flag controlling if automatic scrolling to the page bottom
should be executed. The default value is false
- scrollDelay - delay to wait after executing scroll action (if enabled).
The default value is 5s
- click - flag controlling if automatic click on a random link
should be executed. The default value is false
- clickDelay - delay to wait after executing click action (if enabled).
The default value is 5s
- clickScript - JS script to execute click action(if enabled).
The default script is below.
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- crawler: https://verifications.perforator.io/
- crawler:
url: https://verifications.perforator.io/
- crawler:
url: https://verifications.perforator.io/
delay: 5s
scroll: true
click: true
maxVisitsOverall: 15
maxDuration: 15m
- crawler:
url: https://verifications.perforator.io/
scroll: true
scrollDelay: 2s-4s
click: true
clickDelay: 2s-4s
clickScript: |
const domains=arguments[0];
const result = [];
const links = document.querySelectorAll("a[href]:not([href^='javascript']):not([href^='void']):not([href^='#'])");
const maxChecks = Math.min(links.length, 512);
for(var i=0; i < maxChecks; i++){
if(links[i].checkVisibility({ opacityProperty: true, visibilityProperty: true, contentVisibilityAuto: true,})) {
try {
let url = new URL(links[i].href);
for(var j=0; j < domains.length; j++){
if(url.hostname === domains[j]) {
result.push(links[i]);
}
}
} catch (error) {}
}
}
return result;
linksExtractorScript: |
const domains=arguments[0];
const result = [];
const links = document.querySelectorAll("a[href]:not([href^='javascript']):not([href^='void']):not([href^='#'])");
const maxChecks = Math.min(links.length, 512);
for(var i=0; i < maxChecks; i++){
if(links[i].checkVisibility({ opacityProperty: true, visibilityProperty: true, contentVisibilityAuto: true,})) {
try {
let url = new URL(links[i].href);
for(var j=0; j < domains.length; j++){
if(url.hostname === domains[j]) {
result.push(links[i].href);
}
}
} catch (error) {}
}
}
return result;
action: awaitPageLoad
Action to await page load event in the current browser window.
Parameter of this action specifies how much time to wait till load
event occurs, before giving up and throwing an exception
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- awaitPageLoad: 5s
action: awaitElementToBeVisible
Action to await element to be visible on the page of the current browser window.
Parameter of this action specifies selector for the element to find
in the DOM tree of the page.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
Element is visible when it is present in the DOM tree of the page and
it is visible.
Visibility means that the element is not only displayed but also has a height and width that is greater than 0.
Visibility means that the element is not only displayed but also has a height and width that is greater than 0.
Default timeout to await element to be visible is 30s.
An action fails if such a timeout is reached, but specified element
is not visible yet.
This action supports extended syntax with two dedicated properties:
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be visible
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be visible
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- awaitElementToBeVisible: 'input[type=submit]'
- awaitElementToBeVisible:
cssSelector: 'input[type=submit]'
timeout: 15.5s
- awaitElementToBeVisible:
xpathSelector: '//[@type="submit"]'
timeout: 15.5s
action: awaitElementToBeClickable
Action to await element to be clickable on the page of the current browser window.
Parameter of this action specifies selector for the element to find
in the DOM tree of the page.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
Element is clickable when it is visible on the page, it is enabled,
and you can click on it.
Default timeout to await element to be clickable is 30s.
An action fails if such a timeout is reached, but specified element
is not clickable yet.
This action supports extended syntax with two dedicated properties:
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be clickable
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be clickable
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- awaitElementToBeClickable: 'input[type=submit]'
- awaitElementToBeClickable:
cssSelector: 'input[type=submit]'
timeout: 15.5s
- awaitElementToBeClickable:
xpathSelector: '//[@type="submit"]'
timeout: 15.5s
action: awaitElementToBeDisabled
Action to await element to be disabled on the page of the current browser window.
Parameter of this action specifies selector for the element to find
in the DOM tree of the page.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
Element is disabled when it is present in the DOM tree,
it is visible, and it has a disabled attribute turned on.
Typically this is html input element.
Default timeout to await element to be disabled is 30s.
An action fails if such a timeout is reached, but specified element
is not disabled yet.
This action supports extended syntax with two dedicated properties:
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be disabled
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be disabled
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- awaitElementToBeDisabled: 'input[type=submit]'
- awaitElementToBeDisabled:
cssSelector: 'input[type=submit]'
timeout: 15.5s
- awaitElementToBeDisabled:
xpathSelector: '//[@type="submit"]'
timeout: 15.5s
action: awaitElementToBeEnabled
Action to await element to be enabled on the page of the current browser window.
Parameter of this action specifies selector for the element to find
in the DOM tree of the page.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
Element is enabled when it is present in the DOM tree,
it is visible, and it has no disabled attribute.
Default timeout to await element to be enabled is 30s.
An action fails if such a timeout is reached, but specified element
is not enabled yet.
This action supports extended syntax with two dedicated properties:
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be enabled
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be enabled
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- awaitElementToBeEnabled: 'input[type=submit]'
- awaitElementToBeEnabled:
cssSelector: 'input[type=submit]'
timeout: 15.5s
- awaitElementToBeEnabled:
xpathSelector: '//[@type="submit"]'
timeout: 15.5s
action: awaitElementToBeInvisible
Action to await element to be invisible on the page of the current browser window.
Parameter of this action specifies selector for the element to find
in the DOM tree of the page.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
Element is invisible when it is either invisible or not present in the DOM tree.
Default timeout to await element to be invisible is 30s.
An action fails if such a timeout is reached, but specified element
is not invisible yet.
This action supports extended syntax with two dedicated properties:
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be invisible
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be invisible
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- awaitElementToBeInvisible: 'input[type=submit]'
- awaitElementToBeInvisible:
cssSelector: 'input[type=submit]'
timeout: 15.5s
- awaitElementToBeInvisible:
xpathSelector: '//[@type="submit"]'
timeout: 15.5s
action: awaitAlertToBePresent
Action to await alert to be present in the current browser window.
Parameter of this action specifies how much time to wait till alert is shown,
before giving up and throwing an exception
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- awaitAlertToBePresent: 5s
action: click
Action to click on the element in the current browser window.
Parameter of this action specifies selector for the element to find
in the DOM tree of the page.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
Click action can be performed only on clickable elements,
so as a prerequsite, an action waits till element is present in the DOM tree,
it is visible and enabled.
Default timeout to await element to be clickable is 30s.
An action fails if such a timeout is reached, but specified element
is not clickable yet.
This action supports extended syntax with two dedicated properties:
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be clickable
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be clickable
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- click: 'input[type=submit]'
- click:
cssSelector: 'input[type=submit]'
timeout: 15.5s
- click:
xpathSelector: '//[@type="submit"]'
timeout: 15.5s
action: closeAlert
Action to close an alert shown in the current browser window.
Parameter of this action specifies alert button to click.
It can be either 'ok' or 'cancel'.
Close alert action can be performed only when an alert is shown,
so as a prerequisite, an action waits till alert is present.
Default timeout to await alert to be shown is 30s.
An action fails if such a timeout is reached, but an alert is not present yet.
There are some cases, when an alert has an input field,
so a user should enter a text. You can use extended syntax to send a text alongside closing the alert.
This action supports extended syntax with three dedicated properties:
- action - css selector to find element.
- text - optional text to submit while closing the alert.
- timeout - timeout to await alert to be present.
- action - css selector to find element.
- text - optional text to submit while closing the alert.
- timeout - timeout to await alert to be present.
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- closeAlert: ok
- closeAlert:
action: ok
timeout: 15.5s
- closeAlert:
action: cancel
text: your text
timeout: 15.5s
action: focus
Action to focus on the element in the current browser window.
Parameter of this action specifies selector for the element to find
in the DOM tree of the page.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
Focus action can be performed only on visible elements,
so as a prerequsite, an action waits till element is present in the DOM tree
and it is visible.
Default timeout to await element to be visible is 30s.
An action fails if such a timeout is reached, but specified element
is not visible yet.
This action supports extended syntax with two dedicated properties:
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be visible
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be visible
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- focus: 'input[type=submit]'
- focus:
cssSelector: 'input[type=submit]'
timeout: 15.5s
- focus:
xpathSelector: '//[@type="submit"]'
timeout: 15.5s
action: input
Action to enter text into input element of the current browser window.
This action has two required parameters:
- either cssSelector or xpathSelector, selector of the element where to enter text.
- value, actual text to enter into the input element.
- either cssSelector or xpathSelector, selector of the element where to enter text.
- value, actual text to enter into the input element.
Such action can also be used to upload files when target input element has type="file".
To do so, please specify path to the file you would like to upload in the 'value' property,
for example:
value: './path/to/file/for/upload.json'
value: './path/to/file/for/upload.json'
Input action can be performed only on clickable elements,
so as a prerequsite, an action waits till element is present in the DOM tree,
it is visible and enabled.
Default timeout to await element to be clickable is 30s.
An action fails if such a timeout is reached, but specified element
is not clickable yet.
This action supports extended syntax with three dedicated properties:
- either cssSelector or xpathSelector - selector to find element
- value - text to enter into the input field.
- timeout - timeout to await element to be clickable.
- either cssSelector or xpathSelector - selector to find element
- value - text to enter into the input field.
- timeout - timeout to await element to be clickable.
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- input:
cssSelector: 'input[type=password]'
value: 'your_secured_password'
- input:
cssSelector: 'input[type=password]'
value: 'your_secured_password'
timeout: 30s
- input:
xpathSelector: '//[@type="password"]'
value: 'your_secured_password'
timeout: 15.5s
action: scroll
Action to scroll till the element in the current browser window.
Parameter of this action specifies selector for the element to find
in the DOM tree of the page.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
By default, load-generator uses 'css' selectors, but you can switch default and global behavior to use 'xpath' based selectors via changing defaultSelectorType property of the suite.
Scroll action can be performed only on visible elements,
so as a prerequsite, an action waits till element is present in the DOM tree
and it is visible.
Default timeout to await element to be visible is 30s.
An action fails if such a timeout is reached, but specified element
is not visible yet.
This action supports extended syntax with two dedicated properties:
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be visible
- either cssSelector or xpathSelector - selector to find element
- timeout - timeout to await element to be visible
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- scroll: 'input[type=submit]'
- scroll:
cssSelector: 'input[type=submit]'
timeout: 15.5s
- scroll:
xpathSelector: '//[@type="submit"]'
timeout: 15.5s
action: sleep
Action to postpone any activities according to specified duration.
Parameter of this action specifies duration to sleep.
Sleep action supports randomization,
so you can use the following construct to introduce random
sleeping within specific range:
sleep: 5s-10s
Actual value would be randomly picked at the time of the action processing.
sleep: 5s-10s
Actual value would be randomly picked at the time of the action processing.
---
loadGenerator:
...
suites:
Your Suite Name:
...
steps:
Your Step Name:
- sleep: 3.5s
- sleep: 5s-10s