Run selenium tests in multiple browsers with minimum hastle. Python flavor !
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
wd refactoring. Dec 30, 2013
.gitignore Added gitignore files for pyc, pyo and emacs tmp save files. May 14, 2012
.travis.yml Add travis badge. Nov 11, 2013 New release. May 24, 2012

python-parallel-wd -- Run selenium test in multiple browsers easily - Python flavor


Build Status


pip install python-wd-parallel



Writing a test !

Start by importing the module

import wd.parallel

The test should be implemented as a unittest TestCase. So go ahead and do that

class Selenium2OnSauce(unittest.TestCase):

In the set up you should create your browsers configurations. Or you could just load them from a json file.

    def setUp(self):
        self.drivers = wd.parallel.Remote()

Now just write your test as you would for a unique browser. Test should be run on the self.driver attribute. Just use the @multiply decoration to run the test in all the browser you set up. Check out the selenium documentation for available methods.

    def test_sauce(self):
        self.assertTrue("I am a page title - Sauce Labs" in self.driver.title);
        self.driver.find_element_by_id('comments').send_keys('Hello! I am some example comments. I should appear in the page after you submit the form')

        comments = self.driver.find_element_by_id('your_comments')
        self.assertTrue('Your comments: Hello! I am some example comments. I should appear in the page after you submit the form' in comments.text)
        body = self.driver.find_element_by_xpath('//body')
        self.assertFalse('I am some other page content' in body.text)
        self.driver.find_elements_by_link_text('i am a link')[0].click()
        body = self.driver.find_element_by_xpath('//body')
        self.assertTrue('I am some other page content' in body.text)

The tear down method works just like the test cases. Just work as if there was one browser and add the @multiply decorator.

    def tearDown(self):

if __name__ == '__main__':

Supported Methods

Check out the python wd implementation it has all the documentation about actual tests.

More docs!

WD is simply implementing the Selenium JsonWireProtocol, for more details see the official docs: