0
import pickle
import selenium
from selenium import webdriver
import selenium.webdriver
import options
path = "C:\Program Files (x86)\chromedriver.exe"
driver = webdriver.Chrome(path)
chrome_options = Options()
chrome_options.add_argument("user-data-dir=selenium")
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get("http://www.google.com")

the error that i am getting is: NameError: name 'Options' is not defined am i doing soomething tottaly wrong. im trying to save the cookies so that next time i can login in to my whatsapp without having to manualy do the qr code

ahron
  • 59
  • 6
  • Try: `from selenium.webdriver.chrome.options import Options` – Pedro Lobito Feb 13 '21 at 23:48
  • its still not working. are you able to give me the full code that works – ahron Feb 14 '21 at 00:16
  • No, I won't be able to give you "_the full code that works_" because that's not how things work here. Please read: [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) – Pedro Lobito Feb 14 '21 at 00:20
  • `import pickle import selenium from selenium import webdriver import selenium.webdriver from selenium.webdriver.chrome.options import Options path = "C:\Program Files (x86)\chromedriver.exe" driver = webdriver.Chrome(path) chrome_options = Options() chrome_options.add_argument("user-data-dir=selenium") driver = webdriver.Chrome(options=chrome_options) driver.get("http://www.google.com") ` – ahron Feb 14 '21 at 00:31

0 Answers0