Does anyone know how I could get selenium to run an IE session utilising the \"Run as different user\" function using JAVA? I have no idea how I\'d even go about setting th
The only solution I got is to use robot class to open new session. Actually IE is not providing any shortcut to open new session so we have to do this by robots.
This code will open a new session for you. Best of luck
System.setProperty("webdriver.ie.driver","./IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver();
driver.get("http://www.google.com/");
try{
Robot robot=new Robot();
robot.keyPress(KeyEvent.VK_ALT);
Thread.sleep(3000);
robot.keyPress(KeyEvent.VK_F);
robot.keyRelease(KeyEvent.VK_ALT);
robot.keyRelease(KeyEvent.VK_F);
robot.keyPress(KeyEvent.VK_I);
robot.keyRelease(KeyEvent.VK_I);
}
catch(Exception ex){
System.out.println(ex.getMessage());
}