mozilla/input-tests — pull request #102 by davehunt (2011-11-03 09:55:32+00:00)
Title: Migrate to WebDriver API

This is the migration to the WebDriver API, however there are also a few minor fixes and improvements that were in the way of a migration. Please comment if you have any questions and I will do my best to clarify. It would be very valuable to get a lot of people to look at these changes both from a perspective of reviewing them, but also as assistance with the migration of other projects.

**Note:** Please do not merge this until it's been approved. There will need to be changes to the Jenkins jobs and quite possibly to the Selenium nodes (we have relatively few WebDriver nodes, especially on the platforms that may be needed).

### Known issues
* The datepicker tests will not pass on Mac due to Firefox [bug #566671](https://bugzilla.mozilla.org/show_bug.cgi?id=566671). We need to decide if we want to xfail these in some way, wait for a fix, or avoid running the tests on Mac for now.
* Getting the message count from filters requires hovering over the filter items. As this is not supported on all platforms I have instead used JavaScript to get the text (this is how Selenium RC does it). I have added a TODO to fix this in the future. If we decide not to run on Mac then we may be able to change this sooner.

### Summary of typical changes
* Locators changed to tuples, with the strategy and locator included.
* Selenium API changed to WebDriver.
* Removal of waiting for pages to load and elements to be visible (now relying on implicit waits).
* Explicit waits added where necessary.
* Repeating region objects no longer need a count and singular property. All objects are returned, count is obtained using `len`, and individual items accessed using indices.

### Other changes:
* Removed some unused page region classes (it wasn't possible to test them under a new API if they're not used).
* Renamed methods/classes where I felt it better suited to new API or just to clean up.
* Made minor fixes where possible as a necessity for testing the migration. As a result there will be some extra XPasses, which we should look into.