弹出窗口只发生在我使用Fire Fox浏览器的情况下,有没有办法解决这个问题?每次我使用FF作为我的浏览器时,我必须输入用户名/密码.
目前,我每次运行我的测试都会进入,这非常痛苦,但希望使其更加自动化....

如何更换一个'\'带有'\\'?当我运行时,replaceAll()我收到此错误消息.
Exception in thread "main" java.util.regex.PatternSyntaxException:
Unexpected internal error near index 1 \
^
at java.util.regex.Pattern.error(Pattern.java:1713)
at java.util.regex.Pattern.compile(Pattern.java:1466)
at java.util.regex.Pattern.<init>(Pattern.java:1133)
at java.util.regex.Pattern.compile(Pattern.java:823)
at java.lang.String.replaceAll(String.java:2190)
at NewClass.main(NewClass.java:13)
Java Result: 1
Run Code Online (Sandbox Code Playgroud)
我的代码:
public class NewClass {
public static void main(String[] args) {
String str = "C:\\Documents and Settings\\HUSAIN\\My Documents\\My Palettes";
str = str.replaceAll("\\", "\\\\");
System.out.println(str);
}
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用AutoIt处理我的Selenium webdriver脚本的基本身份验证弹出窗口.我为Firefox和Internet Explorer编写了一个脚本,但它不适用于Chrome.
当我尝试使用AutoIt窗口信息工具识别Chrome上的身份验证时,它显示为空.我正在使用以下AutoIt脚本:
WinWaitActive("Authentication Required","","120")
If WinExists("Authentication Required") Then
Send("username{TAB}")
Send("password{Enter}")
EndIf
Run Code Online (Sandbox Code Playgroud)
任何使这个工作的指针都会有所帮助.我没有使用, username@password:google.com因为重定向会出现一些身份验证弹出窗口.
我在Linux上使用WebDriver(Selenium2)和Java.我正在使用WebDriver自动填写表单并提交.我面临着htaccess网站的问题,即我无法通过WebDriver访问htaccess网站.
在这方面有谁可以帮助我?
谢谢,Sunil