0

I'm trying to run a selenium script on a virtual machine on Google Compute Engine. I have a debian-10-buster machine.

I've already done a pip3 install selenium but when I run my script, I get this error:

selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

I've seen this error when I was trying to setup selenium on my local machine. I know I need to download the chromedriver executable and save it in my path in the virtual machine. However, I am new to using Linux & SSH in general so I have two questions:

  1. How do I download the chromedriver executable in a google virtual machine?
  2. What is the PATH location in a google virtual machine?

I appreciate any help that you can share with me!

Abhay
  • 827
  • 9
  • 34

1 Answers1

0

This is because program is unable to locate chromedriver.exe You need to download it from the link mentioned in the error or just google it. Then you need to specifically define the path it is saved on like this:

driver = webdriver.Chrome(executable_path=r"C:\Users\user\Downloads\chromedriver.exe")

Above is done in Python.

  • Yeah, I get that I need to download it. I need to know how to download it through the Linux SSH interface that's available in a google virtual machine - I'm new to using virtual machines and don't know how to do that – Abhay Jun 06 '20 at 14:26