使用硒网络驱动程序登录弹出窗口?

编程入门 行业动态 更新时间:2024-10-09 19:12:57
本文介绍了使用硒网络驱动程序登录弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

仅当我使用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.

更多推荐

使用硒网络驱动程序登录弹出窗口?

本文发布于:2023-11-27 16:15:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1638710.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:驱动程序   弹出窗口   网络

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!