Answer the question
In order to leave comments, you need to log in
Selenium works with Chrome webdriver with content settings replacement?
In the content settings in Chrome, you can enable or disable, for example, the use of JS. I need to run webdriver with certain values. I tried to connect my pre-created profile, but to no avail. /Default is added to my path and the default profile is opened (even if there is a Default folder with a profile). In the ChromeOptions setting, I also did not find the right one. What to do? I need Chrome
Answer the question
In order to leave comments, you need to log in
in Python
- disable JS
- disable pictures
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
prefs = {"profile.managed_default_content_settings.images": 2,\
'profile.managed_default_content_settings.javascript': 2}
chrome_options.add_experimental_option("prefs", prefs)
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get("https://toster.ru/q/592318")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question