needle icon indicating copy to clipboard operation
needle copied to clipboard

WebDriverException on clean install

Open Naimadnap opened this issue 8 years ago • 6 comments

I try to run simple test from /test directory and I get an error like

~/needle/tests$ nosetests3 test_driver.py --with-save-baseline
...EE
======================================================================
ERROR: test_get_dimensions (tests.test_driver.TestWebElement)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/damian/needle/tests/test_driver.py", line 47, in test_get_dimensions
    self.assertEqual(e.get_dimensions(), {
  File "/usr/local/lib/python3.5/dist-packages/needle/driver.py", line 44, in get_dimensions
    location = self.location
  File "/home/damian/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webelement.py", line 402, in location
    old_loc = self._execute(Command.GET_ELEMENT_LOCATION)['value']
  File "/home/damian/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webelement.py", line 494, in _execute
    return self._parent.execute(command, params)
  File "/home/damian/.local/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
    self.error_handler.check_response(response)
  File "/home/damian/.local/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: GET /session/cd8c0384-21b8-49a4-8493-e7dd682e33cf/element/85d8038e-6e97-4c88-b62f-672cca2f95be/location did not match a known command

Naimadnap avatar Jan 02 '17 11:01 Naimadnap

To me this looks like a potential bug with Selenium itself. Which version of Selenium are you using, and have you tried upgrading to the latest version?

jphalip avatar Jan 07 '17 22:01 jphalip

Selenium 3.0.2 version Firefox in 50.1 python 2.7.12 and 3.5.2 nosetest 1.3.7 ubuntu 16.04 on virtual box

Naimadnap avatar Jan 08 '17 07:01 Naimadnap

Thanks. My gut feeling is that it's a bug with the Selenium package with regard to Firefox. I haven't had a chance to test firsthand yet though. On a side note, it'd be useful to add Firefox to the Travis test matrix — I've created a separate issue for that in #60.

jphalip avatar Jan 08 '17 22:01 jphalip

this is not going to work in firefox using geckodriver, since the Actions class is yet to be implemented. I think the only temporary solution would be to use selenium 2.x

cgoldberg avatar Jan 09 '17 02:01 cgoldberg

Ran into this issue, this is related to a bug with Geckodriver and Selenium: https://github.com/mozilla/geckodriver/issues/548 https://github.com/mozilla/geckodriver/issues/159

A temporary fix for this issue is to downgrade to Selenium 2.53.6 and firefox 45.6. There may be other version combinations that work but in the meantime these have worked for me.

monsonjeremy avatar Mar 16 '17 19:03 monsonjeremy

This should be fixed with the code now in master (support was added for Geckodriver and recent Firefox versions).

jmbowman avatar Mar 27 '17 14:03 jmbowman