0

I am trying to use Python in automating my work which requires to open a web page and fill login details, but I am getting the following error:

WebDriverException: unknown error: DevToolsActivePort file doesn't exist

Code:

actual code

Error:

error shown

Then chrome crashes with the error:

DevToolsActivePort file doesn't exist

What to do now?

Nimantha
  • 6,405
  • 6
  • 28
  • 69

1 Answers1

0

Please, try adding the next in your code:

os.environ['DISPLAY'] = ':0' 
os.environ['XAUTHORITY']='/run/user/1000/gdm/Xauthority'

Remember that you must download the version of WebDriver in this page of Google according to the installed in your pc.

pfabian08
  • 1
  • 2