I was trying to send keys to a text box and send a tab key both at the same time to check for the availabilty of the username
Below you can find the code:
driver.findElement(By.xpath("//label[text()='User Name:']/following::div/input")).sendKeys("UserName");
driver.findElement(By.xpath("//label[text()='User Name:']/following::div/input")).sendKeys(Keys.TAB);
Its not working.