仅当我使用Fire Fox浏览器时才会弹出窗口,是否有办法解决此问题?每当我使用FF作为浏览器时,我都必须输入用户名/密码.
the popup window is only happening if I use the Fire Fox browser otherwise, is there a way to fix this problem? I have to enter userid/password every time the i use FF as my browser.
当前,每次运行测试时我都会进入,这非常痛苦,但是希望使其自动化....
currently, I am entering every time i run my test which is very painful but looking to make it more automated....
我已经看了一眼,并在此处和此处,但无济于事
I have goggled and found two links here and here but no avail
推荐答案
花了几个小时阅读之后,我终于找到了效果很好的解决方案,希望对其他人也有帮助. -享受吧!
After spending hours reading I finally found the solution which works pretty well and I hope this will help others too. - Enjoy!!
首先-请按照以下步骤操作:
First - follow this steps:
1) Open the FireFox browser 2) Type the following `about:config` 3) Look for `network.http.phishy-userpass-length` if you don't find then create a new Integer key Create a new Integer key (right-click->New->Integer): `network.http.phishy-userpass-length` with value `255`第二:您需要使用以下内容创建Firefox驱动程序:
Second: You need to create a Firefox driver with the following:
FirefoxProfile profile = new FirefoxProfile(); profile.SetPreference("network.http.phishy-userpass-length", 255); profile.SetPreference("network.automatic-ntlm-auth.trusted-uris", "YOUR HOST ADDRESS HERE"); _driver = new FirefoxDriver(profile);如果您有任何疑问,请告诉我.
let me know if you have any questions.
更多推荐
使用硒网络驱动程序登录弹出窗口?
发布评论