I have a front page with Clients which I should click on 3dots for a specific client in my script. But after I have clicked on a save button on one of the tabs which brings me back to the grid cell it takes to long and cannot find the 3dots.
Element:
<td role="gridcell">
<a class="btn btn-default" href="/configuration/clientmanagement?Id=352">
<i class="fa fa-ellipsis-v"></i>
</a>
</td>
My code:
//User selects Client to add details
[Then(@"user clicks on the configure dots icon for Client (.*) for main flow")]
[Obsolete]
public void ThenUserClicksOnTheConfigureDotsIconForClientForMainFlow(string ClientId)
{
Thread.Sleep(5);
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
wait.Until(ExpectedConditions.ElementToBeClickable(By.XPath("/html/body/div/main/div/div[2]/div/div/div[2]/table/tbody/tr[3]/td[4]/a")));
Actions action = new Actions(driver);
action.MoveToElement(driver.FindElement(By.XPath("/html/body/div/main/div/div[2]/div/div/div[2]/table/tbody/tr[3]/td[4]/a"))).Build().Perform();
IWebElement ConfigureDots = driver.FindElement(By.XPath("/html/body/div/main/div/div[2]/div/div/div[2]/table/tbody/tr[3]/td[4]/a/i"));
ConfigureDots.Click();
Console.WriteLine("Client selected: " + ClientId);
}