Skip navigation

Top-level navigation

Home Clients Non Profits Webfactory Support About us Services

Selenium driven mode

Selenium is an excellent way of running automated acceptance tests.

However, the documentation doesn't make it entirely obvious how to run it in "driven mode", such that you can write your tests in code.

Thanks to some pointers from Paul Cannon at Novell, we can now run tests that look like this:
    s.execute('open', 'http://www.google.com')
s.execute('type', 'q', 'fsm')
s.execute('click', 'btnG')
The tarball shows how to get started (with Python on Linux).  It should be easy enough to get it working on Windows, too. 

One of the problems with running Selenium tests is that due to cross-site scripting protection, the selenium approach makes it tricky to run tests against sites other than localhost.  This hack just disables all the XSS security using a custom user.js for firefox.  With IE, I believe you can achieve a similar effect by renaming your test runner HTML page with a HDA extension.

Selenium Driven mode example (7.27 Kb)


Secondary navigation

Arthritis Care website wins top prize

Arthritis Care¹s website recently won a top prize in the British Medical Association Patient Information Awards 2007.

Lets Get Cooking chooses Jamkit

Jamkit are proud to announce that we have been appointed to develop a website for Let’s Get Cooking

skip top banner