Issue with Firefox driver when starting the webdriver

214 views
Skip to first unread message

Adrian Vraciu

unread,
Jul 28, 2015, 8:24:21 AM7/28/15
to Selenium Users
Hi guys,
I have the following issue. I have a suite of 22 tests. I start the suite, but after 8 tests ran, the rest of them are failing with the following error:

======================================================================
ERROR: testSecurity01 (CreateIPSEC.Create_IPSEC_GW_Term_Monthly.IpsecTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\avraciu\workspace\AutomationTesting_v2.0\src\Home\IPSEC\CreateIPSEC\Create_IPSEC_GW_Term_Monthly.py", line 21, in setUp
    self.driver = webdriver.Firefox()
  File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 64, in __init__
    self.binary, timeout),
  File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 51, in __init__
    self.binary.launch_browser(self.profile)
  File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 69, in launch_browser
    self._start_from_profile_path(self.profile.path)
  File "C:\Python34\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 92, in _start_from_profile_path
    env=self._firefox_env)
  File "C:\Python34\lib\subprocess.py", line 754, in __init__
    _cleanup()
  File "C:\Python34\lib\subprocess.py", line 474, in _cleanup
    res = inst._internal_poll(_deadstate=sys.maxsize)
  File "C:\Python34\lib\subprocess.py", line 1146, in _internal_poll
    if _WaitForSingleObject(self._handle, 0) == _WAIT_OBJECT_0:
OSError: [WinError 6] The handle is invalid

Can u give me some advice? Thank you.

Mukesh otwani

unread,
Jul 28, 2015, 4:15:23 PM7/28/15
to Selenium Users, var...@gmail.com
Hi Adrian,

Can you please confirm what config u r using.

I will recommend that please use below setup that works for me.

1- Firefox version 37 or below
2- Selenium Webdriver jar 2.46

Adrian Vraciu

unread,
Jul 29, 2015, 3:15:05 AM7/29/15
to Mukesh otwani, Selenium Users
Hi,
I have the latest versions of webdriver and Firefox.
--
Best Regards,
Adrian

Mercious

unread,
Jul 29, 2015, 4:22:41 AM7/29/15
to Selenium Users, mukesh....@gmail.com, var...@gmail.com
Never heared of the issue, so i can only guess:

Do you close (driver.quit) the driver after each Test-Method? 

Adrian Vraciu

unread,
Jul 29, 2015, 4:24:32 AM7/29/15
to Mercious, Selenium Users, Mukesh otwani
At every test, at finish I use this method:
    def tearDown(self):
            self.driver.close()

I don't use driver.quit().

On Wed, Jul 29, 2015 at 11:22 AM, Mercious <hart...@gmx.de> wrote:
Never heared of the issue, so i can only guess:

Do you close (driver.quit) the driver after each Test-Method? 



--
Best Regards,
Adrian

Mercious

unread,
Jul 29, 2015, 5:00:44 AM7/29/15
to Selenium Users, mukesh....@gmail.com, var...@gmail.com
I would prefer driver.quit because if you ever want to run your tests on a grid-setup you will need to end the session to free the node for further test-execution.

You could try quit real quick and see if it makes a difference. I guess not, but it's worth a try. 

Mercious

unread,
Jul 29, 2015, 5:04:00 AM7/29/15
to Selenium Users, mukesh....@gmail.com, var...@gmail.com, hart...@gmx.de
This thread:
http://stackoverflow.com/questions/3028786/how-can-i-fix-error-6-the-handle-is-invalid-with-pyserial

Mentions a problem with 64bit python version.

Consider that. 

Adrian Vraciu

unread,
Jul 29, 2015, 6:15:53 AM7/29/15
to Mercious, Selenium Users, Mukesh otwani
Yes, thanks for the hint. But I use python 3.4.
--
Best Regards,
Adrian
Reply all
Reply to author
Forward
0 new messages