Reputation: 73
I upgraded to selenium 3.141 and Firefox 60. Now just calling the webdriver module no longer works: "from selenium import webdriver".
It says "invalid syntax error".
I am running Python 2.6 . Does anyone know whats wrong?
from selenium import webdriver
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/selenium/webdriver/__init__.py", line 18, in <module>
from .firefox.webdriver import WebDriver as Firefox # noqa
File "/usr/lib/python2.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 29, in <module>
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
File "/usr/lib/python2.6/site-packages/selenium/webdriver/remote/webdriver.py", line 1115
return {k: size[k] for k in ('width', 'height')}
^
SyntaxError: invalid syntax
Upvotes: 0
Views: 191
Reputation: 1623
According to the official documentation, Selenium supports python 2.7 and 3.6, you might want to upgrade your python.
If it's not working you can also try to use an older version of Firefox. It happens in the past that the latest version was not well supported.
Upvotes: 1