Random clicking: links, buttons, checkboxes and file uploads
Clicks random elements matching its selector, or random positions on them.
Nothing to set up: it's on by default, so a plain elsetest --url staging.example.com already uses it. The options below are for fine-tuning.
This is Elsetest's Click plugin. It runs as 9 instances, each with an alias and options of its own (below).
In each step of a test, one plugin instance is picked at random, weighted by its frequency.
Options
Set them for one instance with --plugin alias=<alias> key=value, or for every instance of the plugin with --plugin name=Click key=value. In a config file, each --plugin is an object in "plugins", e.g.:
{
"plugins": [
{ "alias": "ClickLink", "frequency": "high" }
]
}
A selector says which elements of the page an option is about, e.g. #chat-widget or .cookie-banner button: see Selectors.
frequency
--plugin alias=CloseBanner frequency=<level>
How often the plugin runs compared to the others.
selector
--plugin alias=CloseBanner selector=<selector>
The elements to click: a CSS selector, or XPath prefixed with "xpath:". ":root" is the whole page.
position
--plugin alias=CloseBanner position=<position>
Where in an element to click: its center, or a random position in it (see scroll).
scroll
--plugin alias=CloseBanner scroll=true|false
Also act on elements outside the window, scrolling to them first. Otherwise only elements in the window are used, and the Scroll plugin moves the window. With position random, it also clicks anywhere in the element (with selector ":root", anywhere on the page), not just in the part of it in the window.
ignoreSelector
--plugin alias=CloseBanner ignoreSelector=<selector>
Elements this plugin doesn't act on, nor on anything inside them; replaces the global ignoreSelector (not the data-elsetest-ignore attribute, which always applies). The site can also mark the elements in its HTML with the attribute data-elsetest-click-ignore.
ignoreText
--plugin alias=CloseBanner ignoreText=<regex>
This plugin doesn't act on a control whose text or label matches this case-insensitive regular expression; replaces the global ignoreText.
Default instances
| Alias | The options it sets |
|---|---|
CloseBanner | selector=xpath://button[contains(translate(., 'ACCEPT', 'accept'), 'accept') or contains(translate(., 'CONSENT', 'consent'), 'consent') or contains(translate(., 'YES', 'yes'), 'yes') or contains(translate(., 'AGREE', 'agree'), 'agree') or contains(translate(., 'DISMISS', 'dismiss'), 'dismiss')] frequency=low scroll=true |
ClickLink | selector=a[href] frequency=normal |
ClickAnywhere | selector=:root position=random frequency=normal |
MulticlickAnywhere | selector=:root position=random frequency=low |
ClickCheckbox | selector=input[type=checkbox] frequency=normal |
ClickRadioButton | selector=input[type=radio] frequency=normal |
ClickButton | selector=button frequency=normal |
ClickSubmit | selector=input[type=submit], button[type=submit] frequency=normal |
UploadFile | selector=input[type=file] frequency=normal |
Other plugins
Accessibility · Ai · BrokenText · Cluster · History · Login · MutationCluster · Overlap · Scroll · SelectOption · Spelling · Type · Validate
This page is generated from the help texts of Elsetest 0.9.8. The same help is in the program: elsetest --help.