0

So thats my code, I want to open chrome with my default profile information in selenium. but its doesn't load and crashes when I click on profile icon in chrome

from selenium import webdriver from selenium.webdriver.chrome.options import Options

options = webdriver.ChromeOptions()
options.add_argument("--user-data-dir=/Users/Library/Application Support/Google/Chrome/Default/Default")
driver = webdriver.Chrome(executable_path='/Users/Desktop/supbot/chromedriver', options=options, service_log_path="/tmp/log")
driver.get('google.com')
whyeaye
  • 1
  • 2

1 Answers1

0

You should use full path to the driver file like:

C:\pathtodriver\chromedriver.exe

Also, avoid using Capabilities, try this approach:

System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
WebDriver driver = new ChromeDriver();
driver.get('google.com')
Raymond Reddington
  • 1,709
  • 1
  • 13
  • 21