What should happen is that these textfields for login should be filled and the the login button should be pressed (some sort of auto login)
Here is the link to the webpage: Telekom Email Login Page
This are the three methods I'm using:
public String exportDriver() throws IOException {
final InputStream IEDriverStream = getClass().getResourceAsStream("/Driver/IEDriverServer.exe");
final File ieDriverServer = FileWebOpener.stream2file(IEDriverStream, "IEDriverServer", ".exe");
System.setProperty("webdriver.ie.driver", ieDriverServer.getAbsolutePath());
return ieDriverServer.getAbsolutePath();
}
public void goToWebsite(String url) {
driver = new InternetExplorerDriver();
driver.get(url);
}
public void setUsernameAndPassword(String username, String password, int Website) throws InterruptedException {
try{ new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(By.cssSelector("input#user[name='pw_usr']"))).sendKeys(username);
driver.findElement(By.cssSelector("input#pw_pwd[name='pw_pwd']")).sendKeys(password);
driver.findElement(By.cssSelector("input.button.standard_button_size.large#pw_submit")).click();
} catch(Exception e){
e.printStackTrace();
}
}