There are couple of General Options available in selenium IDE for example setting timeout limts, attaching user build extensions, other few settings. In this chapter we will learn about different Selenium IDE General Options.
Selenium IDE General Options
Selenium IDE Options dialog box can be launched by clicking Options > Options… on the menu bar. Though there are many settings available, we will concentrate on the few important ones.
The Genral Option has following menu items:
- Default Timeout Value: This refers to the time that Selenium has to wait for a certain element to appear or become accessible before it generates an error. Default timeout value is 30000ms. In case the application is slow, it is advisable to increase the timeout value to 60000 milliseconds. As usually test environments are slow. It does not mean that the execution will wait for mentioned seconds in every command in the Test Case. But it means that if the required element is not prosent in the page, execution will wait for the mentioned time. Once time is over, execution will stop and return the TimeOut error.
- Selenium Core extensions: Selenium IDE supports a wide range of extensions to enhance it’s capabilities. In fact you can also write your custom extension as per your need in to .js format. This edit box allows to specify the extensions. To add any extension, simply click on browse button to select your user extension. You can attach multiple user extension files over there.
For all the extensions available to use, please visit http://addons.mozilla.org/en-US/firefox/ and look for “Selenium” as a keyword. This will result all the extensions in the market for Selenium IDE.
Or simply click https://addons.mozilla.org/en-US/firefox/search/?q=Selenium&cat=1%2C0&appver=49.0&platform=windows.
- Remember base URL: If checked, this helps IDE to remember the Base URL every time test executes. If unchecked, Selenium IDE will always launch with a blank value for the Base URL. Checked is always advisable.
- Record assertTitle automatically: If Checked, IDE inserts the assertTitle command automatically along with the target value for every visited web page.
- Enable experimental features: Checking this field for the first time imports the various available formats into the Selenium IDE.
- Record Absolute URL: If selected, Selenium will record absolute URL(withhttp:orhttps:Protocol) during recording.
- Autostart record: If you check this, Selenium IDE will immediately record your browser actions upon startup.
Steps to Use User Extensions with Selenium IDE
- Create your user extension and save it as user-extensions.js. While this name isn’t technically necessary, it’s good practice to keep things consistent.
- Open Firefox and open Selenium-IDE.
- Click on Tools, Options
- In Selenium Core Extensions click on Browse and find the user-extensions. js file. Click on OK.
- Your user-extension will not yet be loaded, you must close and restart Selenium-IDE.
- In your empty test, create a new command, your user-extension should now be an options in the Commands dropdown.