Solutions
IE Browser:
1. Using AutoIt, after snapping to the control, write the Au3 script, generate the EXE, and then Java calls EXE
AU3 Script
Dim $account ="Username"Dim $pwd="Password"Dim $dialogTitle=the Windows security"winactivate ($dialogTitle) winwaitactive ($dialogTitle) Sleep (1* -) Controlsettext ($dialogTitle,"","Edit1", $account) Sleep (1* -) Controlsettext ($dialogTitle,"","Edit2", $pwd) Controlclick ($dialogTitle,"","Button2") Sleep (1* -)
Java call code, you can change the absolute path to a relative path
Runtime rn = runtime.getruntime (); NULL ; Try { = rn.exec ("\" d:/workspace/test.exe\ ""); Catch (Exception e) { System.out.println ("Error exec!") ); }
2. Change the registration form
Save the following Save as Reg, double-click
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\main\featurecontrol\feature_http_username_password_ DISABLE]
"Iexplore.exe" =dword:00000000
Firefox browser
Precede the address with a user name and password, such as: Http://username:[email Protected]:8888/index
Reference: http://m.blog.csdn.net/blog/lan0227/36384201
http://blog.csdn.net/max229max/article/details/34456507
Selenium how to resolve window security verification issues