Selecting options in dropdowns
Selects random options in dropdowns.
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 SelectOption plugin. It runs as the instance SelectOption.
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=SelectOption key=value. In a config file, each --plugin is an object in "plugins", e.g.:
{
"plugins": [
{ "alias": "SelectOption", "scroll": true }
]
}
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=SelectOption frequency=<level>
How often the plugin runs compared to the others.
ignoreSelector
--plugin alias=SelectOption 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-select-option-ignore.
ignoreText
--plugin alias=SelectOption ignoreText=<regex>
This plugin doesn't act on a control whose text or label matches this case-insensitive regular expression; replaces the global ignoreText.
scroll
--plugin alias=SelectOption 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.
Default instances
| Alias | The options it sets |
|---|---|
SelectOption | frequency=normal |
Other plugins
Accessibility · Ai · BrokenText · Click · Cluster · History · Login · MutationCluster · Overlap · Scroll · 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.