I have some experience with JMeter for performance and scale, but I'm very new to Selenium for browser based testing.

At present I have some simple Selenium scripts recorded for Firefox. These are essentially multiple clients acting alone with no way to coordinate actions between clients.

I am looking for a way to coordinate actions between clients like client1 does x so client2 does y etc. I can easily put logic in each client, but what I'm looking for is a way to control each client and having each client perform different actions depending on some ytbd master logic to rule them all.

I understand that Selenium Grid will drive multiple clients. Can it or some other Selenium module better for the purpose also contain conditional logic to do different things with different clients, and if possible depending on results from those clients? Any brief hints on that or links to useful resources welcome.

I really am very new to the Selenium architecture as you can easily tell.


You can export recorded Selenium scripts to different programming languages. This means you can add all kind of logic during runtime (in your programming language of choice).

You could get the browser version and do different actions depending on what version is returned, see: https://stackoverflow.com/questions/12556163/get-browser-version-using-selenium-webdriver

After your tests are setup and are running locally you could setup a Selenium Grid to run against different browsers (which might not be available local) and in parallel on multiple systems to speed the test run, but you can also run your tests on your computer against different/multiple browsers, see: https://stackoverflow.com/questions/16076971/running-selenium-webdriver-test-cases-against-multiple-browsers

I would avoid the extra complexity of the Grid until you get everything working on your local system. I would start using the grid if you want to run your tests from an automated build system or against browsers your local computer cannot support, for example to test crossplatform against different operating systems.

| improve this answer | |
  • Thanks for the pointers those are useful. But, what I really want to know about here is a built in mechanism for waiting for one client to complete a particular action before triggering another client to perform an action in response. – user_lite_xf Mar 9 '14 at 6:24
  • I'm also interested in hearing about any homegrown solutions to similar problems, but I'd really really like to hear about how this is achieved with built in mechanisms if any. Yes, clients can wait/poll until a particular state is present, but that is not my goal here. Thanks! – user_lite_xf Mar 9 '14 at 6:29
  • I think I miss understood your meaning of client. I thought you ment browser and with different clients different browsers. Do you mean with client "instance of a browser"? You could fire two instances from one script and let one wait until the other is finished with its tasks. Selenium is only a way to drive a browser with actions, it does not have options to synchronise between two running tests. – Niels van Reijmersdal Mar 9 '14 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.