Seite 1 von 1

Python Selenium Profil speichern

Verfasst: Mittwoch 14. September 2022, 08:17
von Yokozuna
Hallo,

Ich möchte, dass Selenium beim Öffnen von Chrome mein Profil speichert. Ich habe einiges im Internet gefunden, aber ich bekomme überall Error. Wenn mir jemand helfen könnte, wäre das Top.

options = webdriver.ChromeOptions()

options.add_argument("user-data-dir=C:/Users/jamu/AppData/Local/Google/Chrome/User Data")

w = webdriver.Chrome(executable_path="C:\\Users\\chromedriver.exe", chrome_options=options)

Ich bekomme erstens den error webdriver das ändere ich ganz einfach zu driver das ist kein Problem
Dann bekomme ich den Error: 'ChromeOptions' object has no attribute 'add_argument'. Did you mean: 'add_arguments'?
Ich habe dann add_argument zu add_arguments ausgebessert.
Allerdings bekomme ich dann diesen Fehler hier: TypeError: Chrome() takes no arguments

Vielen Dank im vorraus.

Ich wäre euch sehr dankbar, wenn mir jemand helfen könnte.