Answer the question
In order to leave comments, you need to log in
Loading user profile when opening Chrome?
Good afternoon, there was a problem when opening the test browser Chrome (Selenium WebDriver), I can not enter the profile created earlier.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
class Add_to_cart(object):
#driver ='C:/chromebot/driver/chromedriver.exe'
#def __init__(self, size):
#self.driver = driver
def ChromeOptions(self):
options = webdriver.ChromeOptions()
#options = Options()
options.add_argument("user-data-dir=C:\\Users\\User\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1")
driver = webdriver.Chrome(executable_path = r'C:/chromebot/driver/chromedriver.exe', chrome_options = options)
driver.get("chrome://version/")
a = Add_to_cart()
a.ChromeOptions()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question