Selenium Webdriver and Basic Auth in IE
问题 Is there any way to provide username and password to a basic auth dialog in IE using Selenium Webdriver? Passing the credentials in the URL is not an option for us. 回答1: I got a solution for this epic problem Use awt!! Open the URL and use the java Robot class or the SmartRobot class given below: class SmartRobot extends Robot { public SmartRobot() throws AWTException { super(); } /*public void pressEnter() { keyPress(KeyEvent.VK_ENTER); delay(50); keyRelease(KeyEvent.VK_ENTER); } */ public