Ich versuche, auf das cr-toggle-Element Python Selenium zuzugreifenHTML

HTML-Programmierer
Guest
 Ich versuche, auf das cr-toggle-Element Python Selenium zuzugreifen

Post by Guest »

Ich erstelle ein Programm zum Einrichten neuer Profile mit einem benutzerdefinierten Namen und versuche, auf das cr-toggle-Element zuzugreifen, kann dies jedoch nicht sehen, wenn ich Selenium verwende.

Code: Select all

def setup_profile(profile_name):
enter code here`profiles_dir = os.path.join(os.getcwd(), "profiles")
os.makedirs(profiles_dir, exist_ok=True)
user_data_dir = os.path.join(profiles_dir, profile_name)

options = Options()
options.binary_location = chromium_path
options.add_argument(f"--user-data-dir={user_data_dir}")
options.add_argument(f"--profile-directory={profile_name}")
options.add_argument("--disable-web-security")
options.add_argument("--allow-running-insecure-content")
options.add_argument("--no-sandbox")
options.add_argument("--enable-chrome-browser-cloud-management")
options.add_argument("--force-dev-mode-highlighting")
options.headless = False
options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(service=Service(ChromeDriverManager(chrome_type="chromium").install()), options=options)
Geben Sie hier die Bildbeschreibung ein
Geben Sie hier die Bildbeschreibung ein

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post