A
A
Arondy2021-10-19 19:03:41
Python
Arondy, 2021-10-19 19:03:41

Why are selenium commands not executed when using chrome profile?

There is a code (everything you need is written earlier):

options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ['enable-automation'])
options.add_argument("user-data-dir=directory + '\Profile 1' ")
driver = webdriver.Chrome(executable_path=chromedriver_path, options=options)
driver.maximize_window()
driver.get(url=url)

If you remove the line that uses the Chrome profile from here, everything works perfectly. If not removed, other commands are not executed after driver.get(url).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
arsu4ka, 2021-10-26
@arsu4ka

Are you using the default empty profile or custom/your own?
I wrote both with that, and with that, everything seems to work.
Send your code with the action that cannot be performed.
If you try to import the default profile, then the compiler may swear because the web driver already starts with the default profile and this line is optional.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question