Selenium: Difference between revisions

From Genecats
Jump to navigationJump to search
(Added new section on setting up Selenium IDE)
(→‎Setting up Selenium IDE: Added initial setup proceedure)
Line 18: Line 18:


=Setting up Selenium IDE=
=Setting up Selenium IDE=
Content coming....
1. [http://seleniumhq.org/download/ Download/install Selenium IDE] for Firefox
 
2. Open Selenium IDE from Firefox under the Tools pulldown menu
 
3. Once IDE is open, go to: Options > Options... > Locator Builders and reorder them to (from top down): id, name, link, css, ui, ...then everything else...
 
<blockquote>Ordering them like this makes for faster running tests, as finding unique elements (id, name, link) is faster (and easier to read) than hunting for them using another method. The fallback is using css selectors, as [http://saucelabs.com/blog/index.php/2011/05/why-css-locators-are-the-way-to-go-vs-xpath/ css selectors have proven to be faster] than xPath.</blockquote>


=Element Locators=
=Element Locators=

Revision as of 22:30, 9 December 2011


This is mostly a place holder while we develop more content. Here are some useful links...

The Basics

Setting up Selenium IDE

1. Download/install Selenium IDE for Firefox

2. Open Selenium IDE from Firefox under the Tools pulldown menu

3. Once IDE is open, go to: Options > Options... > Locator Builders and reorder them to (from top down): id, name, link, css, ui, ...then everything else...

Ordering them like this makes for faster running tests, as finding unique elements (id, name, link) is faster (and easier to read) than hunting for them using another method. The fallback is using css selectors, as css selectors have proven to be faster than xPath.

Element Locators

A common way to find elements on a page using Selenium is xPath, however, we should use CSS selectors when possible, as the tests run faster - especially in IE. Here's some info:

Selenium Resources

General Automated Testing Resources