Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Mouse Hover, Right click, Double click, Click and Hold, Keyboard activities and so on

Category: Selenium WebDriver
Move To Element:
Actions builder=new Actions(driver);
WebElement ele=driver.findElement(By.xpath("".//*[@id='autosuggest']/ul/li[2]/a""));
builder.moveToElement(ele).build().perform();
builder.click(ele).build().perform();

Right Click on Element:
Actions act=new Actions(driver);
act.contextClick(driver.findElement(By.linkText(“Gujarati”))).perform();

Key Down:
Actions act=new Actions(driver);
act.contextClick(driver.findElement(By.linkText(""Gujarati""))).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ENTER).build().perform();

Leave a Reply

Your email address will not be published. Required fields are marked *