Selenium webdriver - Tab control
What about this ?
WebElement emailElement = driver.findElement(By.id("email"));emailElement.sendKeys("ABCDEFG@g.com");WebElement usernameElement = driver.findElement(By.id("username"));usernameElement.click(); // Here, autocomplete is doneString userName = usernameElement.getText(); // get the valueassertEquals("ABCDEFG@g.com", userName);
If you want to send the TAB
key with selenium, you can do that :
emailElement.sendKeys(Keys.TAB);