Q:

Next Element on Webpage (Java)

For selenium webdriver, is there a java command that can get the next element on a webpage? (equivalent of a user pressing the tab button)

A:

You can use the following :
    driver.findElement(By.name("userName")).sendKeys(Keys.TAB); //this will press the tab on your current element
    driver.switchTo().activeElement().sendKeys("YourInput");//this will put the focus on your current element i.e. next element and you can perform any function as desired.

