1

I can open the chrome user i wanted to open but the selenium wont go to the url i type. Below is my code and output after it open the chrome user.

Code:

from selenium import webdriver

from selenium.webdriver.chrome.options import Options

options = webdriver.ChromeOptions()

options.add_argument("user-data-dir=C:\\Users\\eugen\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1")

driver = webdriver.Chrome(executable_path=r'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe', chrome_options=options)

driver.get('https://www.google.com')

Ouput:

selenium.common.exceptions.WebDriverException: Message: Service C:\Program Files (x86)\Google\Chrome\Application\chrome.exe unexpectedly exited. Status code was: 0

Mustafa Poya
  • 2,615
  • 5
  • 22
  • 36
F1a5h82
  • 11
  • 3
  • I guess your user-data-dir location is wrong, its upto `C:\\Users\\eugen\\AppData\\Local\\Google\\Chrome\\User Data` only. Also check the chrome browser version and chrome driver version, both should be in sync. – Sariq Shaikh Nov 15 '20 at 08:28

0 Answers0