Selenium Commands

Can I add cookies?

You can add cookies by using the ‘Create Cookie’ command.

The first argument is the name=value, e.g.

PHPSessionID=1213121

The second argument contain options for the cookie. Currenly ‘path’ and ‘max_age’ are supported.

The format is:

"path=/directory/, max_age=3600"

For more details see HOWTO: Cookie manipulation with Selenium and Cloud Testing

I need to click on a link that only appears after a mouseover – how do I script this?

To simulate a MouseOver event in the browser by using the ‘Mouse Over’ event, using ‘link=String’ as Argument 1.

The script I imported contains ‘Click’ commands that cause the next step to fail – what can I do?

There are two very similar Selenium commands ‘click’ and ‘clickAndWait’. If you are using a click command, which will take some time to complete (such as a new page load), you should change this to a clickAndWait command, which will wait for the page to load.

How do I use the Selenium Highlight command?

A worked example of this is available Using the Selenium Highlight command with Cloud Testing. Note that you will need to use a Capture Screenshot command to enable you to see the highlighted field as it is reset on a page load or refresh.

Still got a question?

If you have a question that we haven’t answered, please contact us.

FAQ Home