Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98775

Issue with DoubleClick method of Actions in Selenium WebDriver C#

$
0
0

While working with selenium webdriver in C#, I am encountering an issue. Below is the code to click on the icon, which is marked in the red area(in the image).

IWebDriver driver = new ChromeDriver(options);
IList<IWebElement> status = driver.FindElements(By.XPath("//table[@id='tblFileList']//tr//td[contains(text(),'New')]"));

for (int i = 0; i < status.Count; i++)
{
    action.DoubleClick(status[i]).Build().Perform();
    Thread.Sleep(2000);
    i++;
}

Problem:

The above code clicks on the icon, but it starts clicking on the icon from 0 index. Let's say, if the loop is running for 7th time then it will start clicking on the icon from 0 index to 6 index.

What is the possible fix for this?

enter image description here


Viewing all articles
Browse latest Browse all 98775

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>