Double click a record in a grid using Selenium webdriver

0 votes


Please help me to write a code for doubleClick() on a record using web driver?

I displayed few records in the body part. Once I click on a record I should get a popup window to update it.

I tried the following code:

Actions action = new Actions(driver);
action.moveToElement(driver.findElement(By.xpath("//table/tbody/tr[2]/td/div/div/table/tbody/tr[10]/td[1]"))).doubleClick().build().perform();
Mar 29, 2018 in Selenium by Martin tyler
797 views

1 answer to this question.

0 votes


Try Actions class to perform this

Actions action = new Actions(driver);
WebElement element=driver.findElement(By.linkText("TEST"));

//Double click
action.doubleClick(element).perform();
answered Mar 29, 2018 by Damon Salvatore
• 5,490 points

Related Questions In Selenium

0 votes
1 answer

Using keys (Ctrl+A) in Selenium WebDriver

You can use the below code: String select ...READ MORE

answered May 9, 2018 in Selenium by Meci Matt
• 9,400 points
1,269 views
0 votes
2 answers
0 votes
1 answer

How to open a browser window in full screen using Selenium WebDriver with C#

Simply Use this: driver.Manage().Window.Maximize(); READ MORE

answered Jun 7, 2018 in Selenium by Samarpit
• 5,130 points
2,587 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,050 points
259 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
628 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
256 views
0 votes
1 answer

How to use Actions class in Selenium Webdriver?

In seleniun webdriver it is not mandatory ...READ MORE

answered Apr 4, 2018 in Selenium by Damon Salvatore
• 5,490 points
2,271 views
0 votes
1 answer

Handling Alerts Selenium Webdriver

You can use Explicit Wait from here https://www.seleniumhq.org/docs/04_webdriver_advanced.jsp#explicit-and-implicit-waits public ...READ MORE

answered Apr 9, 2018 in Selenium by Damon Salvatore
• 5,490 points
173 views