Resolving Authentication Issues in Python with Windows Authentication
When attempting to enter data into a prompt using Python's selenium module, you may encounter issues with Windows Authentication not working. This article addresses such difficulties by providing a solution in the Python environment.
Utilizing Selenium 3.4.0, geckodriver v0.18.0, Mozilla Firefox 53.0, and Python 3.6.1, authentication can be bypassed by embedding both the username and password directly into the URL itself.
To resolve the issue, open the URL with the embedded credentials as follows:
from selenium import webdriver from selenium.webdriver.firefox.firefox_binary import FirefoxBinary binary = FirefoxBinary('C:\\Program Files\\Mozilla Firefox\\firefox.exe') driver = webdriver.Firefox(firefox_binary=binary, executable_path="C:\\Utility\\BrowserDrivers\\geckodriver.exe") driver.get("http://admin:[email protected]/basic_auth")
Das obige ist der detaillierte Inhalt vonWie umgehe ich Windows-Authentifizierungsprobleme in Python mit Selenium?. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!