Quality Testing

Quality is delighting customers

How to do double click on a element using Selenium Webdriver?

How to do double click on a element using Selenium Webdriver?

Can any one please share the code.

Views: 209

Reply to This

Replies to This Discussion

Hi madhuri,

for double click on a element using webdriver by using Actions and

try below mentioned sample code 

WebDriver driver = new FirefoxDriver();

driver.navigate().to("http://jsbin.com/obeyu4/3");
WebDriverWait wait = new WebDriverWait(driver, 30);
Actions act = new Actions(driver);
act.doubleClick(driver.findElement(By.id("golink"))).perform();
Thread.sleep(3000);
System.out.println(driver.getTitle());

I think this will helpfull 2 u :-)

re

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

¬© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service