0

In using .net selenium webdrivers, I have been stumbling in 2 main issues, each for a different specific webdriver.

The table below shows the issues Chrome and Firefox webdrivers have been falling short with me:

enter image description here

I am using RellYa's selenium jquery extensions.

Chrome webdriver randomly throws a jQuery not found exception. If I try a couple of times, I eventually succeed.

With Firefox's webdriver, this never happened. On the other hand, firefox throws a

Unable to bind to locking port 7054 within 45000 ms

Research shows that the reason behind this is that I must have left another firefox webdriver not closed/not quit. But this defeats my using selenium to automate web tasks, in a multi threaded manner. I mean, after a couple of threads are opened, seems it reaches some limit and waits for one of the opened webdrivers to close.

Actually, from this firefox webdriver's documentation, they make it clear that only one instance is supposed to be running. What one is supposed to do then if he had in mind multi threading ?

Does any one have working solutions for the problems singled out in the table, for each specific webdriver implementations ?

Veverke
  • 9,208
  • 4
  • 51
  • 95

1 Answers1

1

No, you can run multiple instances of firefox, chrome, or whatever from your machine at any one time. If you research "Selenium Grid", you will see that it is designed to do that.

So:

  1. The unable to bind message on firefox is not caused by another driver locking a port. Each driver instance starts on its own open port.

  2. If you are not using Selenium Grid, or not using the grid, and are trying to handle the multi-threading yourself, just be careful of how you open and close your browsers in your @Configuration phases in your test runner.

  3. As a educated guess, if you have instability, its more likely because you are trying to control a newer browser with a too-old version of Selenium? We need more info on your question, such as an example project to look at.

djangofan
  • 28,471
  • 61
  • 196
  • 289
  • Thanks for the tips, will go over them in detail. Although regarding the grid, if I understood right it is intended for parallel processing, it's not a solution for multi-threading. No ? – Veverke Jul 30 '15 at 14:46
  • Thats right, you handle the parallel runs with your test runner. The grid can consume the signals from the parallel run and control multiple browsers. – djangofan Jul 31 '15 at 14:22
  • having that said, it's not really what I am looking for. I just need a simple multi-threaded solution. – Veverke Aug 02 '15 at 07:50