Clicking Elements

To click on a button, use the click instruction with the CSS/XPath selector of the button you want to click on.

If you want to click on the button whose id is secretButton, you need to use this JavaScript scenario:

JSON
1
{
2
"instructions": [
3
{"click": "#secretButton"}
4
]
5
}

You can use both CSS and XPath selectors in all instructions. All selectors beginning with / will be treated as XPath selectors. All other selectors will be treated as CSS selectors.