I try to open a tab with a profile but I get this error
WebDriver.init() got multiple values for argument ‘options’
from selenium import webdriver
from selenium.webdriver import ChromeOptions
PATH = "chromedriver.exe"
url = "https://web.whatsapp.com/"
options = ChromeOptions()
options.add_argument("user-data-dir = C:\\Users\\omer\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1")
Driver = webdriver.Chrome(PATH,options=options)
Driver.get(url) ```
>Solution :
You have to use Service class now to pass the executable_path
Check the below code:
from selenium import webdriver
from selenium.webdriver import ChromeOptions
from selenium.webdriver.chrome.service import Service
service = Service(executable_path="C:/<fullpath>/chromedriver.exe")
url = "https://web.whatsapp.com/"
options = ChromeOptions()
options.add_argument("user-data-dir = C:\\Users\\omer\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1")
Driver = webdriver.Chrome(service=service,options=options)
Driver.get(url)