如何使用 Selenium 向 ChromeDriver 提交 HTTP 身份验证(Flask BASIC Auth)
How to submit HTTP authentication (Flask BASIC Auth) with Selenium to ChromeDriver
我正在使用 BASIC Auth
访问 Flask 应用 URL
from xvfbwrapper import Xvfb
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
def main():
xvfb = Xvfb()
xvfb.start()
driver = webdriver.Chrome()
driver.get('https://user:password@192.168.178.55:7000/wow')
xvfb.stop()
if __name__ == '__main__':
main()
使用URL传递用户和密码无效
还有什么建议吗?
I am pretty aware that there is at least a dozen posts that seems to deal with this same exact issue, although none actually resolve it while using the ChromeDriver with Flask BASIC Auth or are simply outdated.
Here for Firefox only or Here
在URL的末尾加一个/
解决
driver.get('https://user:password@192.168.178.55:7000/wow/')
我正在使用 BASIC Auth
访问 Flask 应用 URLfrom xvfbwrapper import Xvfb
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
def main():
xvfb = Xvfb()
xvfb.start()
driver = webdriver.Chrome()
driver.get('https://user:password@192.168.178.55:7000/wow')
xvfb.stop()
if __name__ == '__main__':
main()
使用URL传递用户和密码无效
还有什么建议吗?
I am pretty aware that there is at least a dozen posts that seems to deal with this same exact issue, although none actually resolve it while using the ChromeDriver with Flask BASIC Auth or are simply outdated.
Here for Firefox only or Here
在URL的末尾加一个/
解决
driver.get('https://user:password@192.168.178.55:7000/wow/')