0

I get the following error when trying to run my Selenium web tests.

Please do not mark this as duplicate because the answer on the original post is actually not answered straightforward and clear.

I am new to this so I would really appreciate clear directions. Please and thank you!

I am running Python 3.7.3 and have checked that my PYTHONPATH content with the command

python -c "import sys; print(sys.path)

Here is what I have in it.

['', 'C:\\Python\\python37.zip', 'C:\\Python\\DLLs', 'C:\\Python\\lib', 'C:\\Python', 'C:\\Users\\uzzma\\AppData\\Roaming\\Python\\Python37\\site-packages', 'C:\\Python\\lib\\site-packages']

I then installed middleware with the command

pip install middleware

Here is the error,

Error
Traceback (most recent call last):
  File "C:\Python\lib\unittest\case.py", line 59, in testPartExecutor
    yield
  File "C:\Python\lib\unittest\case.py", line 611, in run
    self.setUp()
  File "C:\Users\uzzma\PycharmProjects\ChromeWebTest\src\test_template.py", line 7, in setUp
    self.driver = webdriver.Chrome()
  File "C:\Python\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__
    desired_capabilities=desired_capabilities)
  File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "C:\Python\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Python\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome version must be between 70 and 73
  (Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.17134 x86_64)



Assertion failed

Process finished with exit code 1

Assertion failed

I'm not at all sure how I would go about adding it to the PYTHONPATH. Any help with this would be much appreciated.

1 Answers1

0

Well, turns out that my Chrome web driver did not support my Chrome browser version. My browser was running version 74 and the web driver only supported till version 73.

Solution- Updated the Chrome webdriver! :)