0

Below code opens a chrome tab but does not open the google link.

Error : "You are using an unsupported command-line flag"

from selenium import webdriver
driver=webdriver.Chrome("E:\\Chrome Driver\\chromedriver.exe")
driver.get('https://www.google.com')
driver.implicitly_wait(20)
driver.quit()
  • the path should be with `r` prefix like `r"E:\\Chrome Driver\\chromedriver.exe"` instead of `"E:\\Chrome Driver\\chromedriver.exe"` . The final statement should be like `driver=webdriver.Chrome(r"E:\\Chrome Driver\\chromedriver.exe")` – Stack Dec 16 '17 at 07:16
  • 1
    the backslashes might be the problem. Can you try `webdriver.Chrome("E:/Chrome Driver/chromedriver.exe")` – hansaplast Dec 16 '17 at 07:17
  • Put the driver in the same directory as your file, and no need to define the driver path. – MD. Khairul Basar Dec 16 '17 at 07:19
  • Thanks. I tried to convert it to raw string but even after that same error shows up. Also, it also asks to disable the developer extension – KARTHIK KUMAR Dec 16 '17 at 07:20
  • Thanks. I tried to convert it to raw string but even after that same error shows up. Also, it also asks to disable the developer extension – KARTHIK KUMAR Dec 16 '17 at 07:20
  • replaced backslashes with forward slashes - no go @hansaplast – KARTHIK KUMAR Dec 16 '17 at 07:41

1 Answers1

-1

go through this link. your code is perfect. it is only version problem Chrome Error: You are using an unsupported command-line flag: --ignore-certifcate-errors. Stability and security will suffer

nishant kumar
  • 507
  • 10
  • 28