Hi Varun ,
Thanks. I can try the solution provided by you.
But using waitFors {} should not increase execution time, as the moment it gets the element to be clicked, it will do its action and will come out of the closure.
Also, the solution which was provided in the link to get the exact element locator was already considered, but still the error comes.
The waitFors {} on click has actually solved the issue in chrome, and there was no increase in the time execution as well.
What we can do is, if we do not want this to effect other browser, we can just use:
@Override
Navigator click() {
if(driver.toString().contains("chrome")){
getBrowser().waitFor {contextElements.first().click()}}
else{ contextElements.first().click()
}
this
}
The only reason why i am proposing this solution is any body using click actions in chrome will face this issue.
We have drastically reduced our failure count by implementing this solution, with zero side effects.
~Subrahmanyam