Selenium webdriver使用Web驱动程序的Java代码,用于双击网格中的记录

Selenium webdriver使用Web驱动程序的Java代码,用于双击网格中的记录

问题描述:

如何使用网络驱动程序在记录上为 doubleClick()编写selenium java代码?

How to write selenium java code for doubleClick() on a record using web driver?

我有在身体部位显示了一些记录。一旦我点击了一条记录,我们就会得到一个弹出窗口来更新它。

I have displayed some records in the body part. Once I clicked on a record we should get a popup window to update it.

请建议如何使用网络驱动程序编写Selenium Java代码。

Please suggest how to write Selenium Java code using web driver.

我试过以下代码:

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();


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().perform();

此代码有效!!!