Adding Custom Formats

By default, Selenium IDE can save test cases with HTML or Ruby script. You can add any format you like by writing JavaScript code.

In this tutorial, we will add a simple CSV format.

Implementing basic functions

Open Options dialog by selecting "Options..." in the menu bar, and click "Formats" tab. You can see the list of available formats. Let's create a new format by clicking "Add" button.

Tags: 

Locator for Links Wrapping HTML Tags (enclosingLink locator)

This locator REQUIRES release 1.0 (tested with Beta 2). It WILL NOT work with the 0.8.7 or early releases of SIDE.

If you click on a link that contains other HTML tags, the Selenium IDE will (or may depending on what is in the tag and where you click) generate a location for the HTML tag inside of the link.  e.g. for this HTML,

Ordering Locators

You may find that you need a different order for the locators (whether or not you add new ones).

To do this, make a .js file containing this line:

LocatorBuilders.order = ['id', 'link', 'name', 'dom:name', 'xpath:link', 'xpath:img', 'xpath:attributes', 'xpath:href', 'dom:index', 'xpath:position']; Then follow the instructions above using this file for the locator file.

Tags: 

Example of how to test table sorting using the JavaScript substring function

This is an example of how to:

  • Test the sorting of column data (ASC|DESC)
  • Use the javaScript substring function to trim a string variable to a desired length

In the example application, the user can sort both columns ("Fac No" and "Fac Name") ascendingly or descendingly by clicking on the column header:

Setting up Eclipse for Selenium Webdriver

I copied these steps from: http://assertselenium.com/2012/10/28/how-to-setup-a-webdriver-project-in... just in case that article dissappears (not to claim credit). The article was originally written by:

Posted by: assertselenium // eclipse, Selenium, WebDriver // selenium eclipse, Selenium setup, WebDriver, WebDriver project // October 28, 2012

Steps To Create a Selenium Project in Eclipse

Step 1: Download Eclipse

Tags: 

Pages