We have seen in previous post about actions
Go to site : amazon.in
and move to particular element using action class
More info : http://selenium.googlecode.com/svn@7074/trunk/docs/api/java/index.html
Go to site : amazon.in
and move to particular element using action class
More info : http://selenium.googlecode.com/svn@7074/trunk/docs/api/java/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ActionsAmazon { | |
public static void main(String[] args) throws InterruptedException { | |
// TODO Auto-generated method stub | |
WebDriver driver=new FirefoxDriver(); | |
driver.get("http://www.amazon.in"); | |
Thread.sleep(9000); | |
//*[@id="nav_grp"]/li[2]/a | |
WebElement item = driver.findElement(By.xpath("//*[@id='nav-link-shopall']/span[2]")); | |
// Actions class move to this item | |
Actions builder = new Actions(driver); | |
builder.moveToElement(item).build().perform(); | |
Thread.sleep(3000); | |
} | |
} |