0

I can not get the button to be clicked, however it is working rarely I tried waits such as:

WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
wait.Until(ExpectedConditions.ElementToBeClickable(ViewBtn)).Click();

it is not even waiting, it goes immediately to the next line of code which means that the button is clickable.

I also tried to click it using Javascript but it is not working also:

((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].click();", ViewBtn); 

Whatever I try to use to click the button, it does not work and it does not cause any exceptions to be thrown.

This button exists in a table, in every row, and I am clicking a td that contains anchor text inside, originally it is clickable but when I filter the table using a search condition the button stops working, (clicking manually still works)

  • In that case can you try to click with different available locators? – NarendraC Jan 5 '17 at 10:46
1

I fixed it by dealing with the anchor text not the td, it is strange that clicking the td works before filtering results and stops working after that

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.