in OpenQA.Selenium.Firefox.Internal.ExtensionConnection
at line 83 the locking port is calculate as (this.profile.Port - 1)
but if the user will creates 3 firefox istances setting 3 different ports on the profiles
passed to the .ctor the global lock is broken becouse it will lock on 3 different ports.
a simple fix will be to use the defaultport constant
using (ILock lockObject = new SocketLock(FirefoxDriver.DefaultPort - 1))
but this will not work if the user has another external process that uses that port.
maybe a better alternative is to implement ILock with a file system locking (ie open/create
an empty file in a "global dir", for example in the AppData subdir, and open it with
FileShare.None enum value). OpenOffice uses a similar locking mode so it can be used
also on not-windows os (but i am not sure of it)
Originally reported on Google Code with ID 6934
Reported by
clz.livio
on 2014-01-31 09:56:45