When attempting to utilize the code snippet below
return this.driver.findElement(By.css("div[class*='img']")).click();
An error occurs:
Uncaught WebDriverError: unknown error: Element is not clickable at point (525, 889). Other element would receive the click:...
Is there a way to force the click action even if the "other element" is in the way? I am working with webdriverjs.
The issue stems from the website I am testing, which employs some fancy react elements that hide the link associated with the image. Instead of directly linking an image, the entire image is masked by a transparent box that redirects users to a different page. Despite not technically clicking the image, from a user perspective, it appears to be the same action.
Previously with webdriverIO, I could achieve this using
browser.moveToObject("img");
browser.leftClick();
However, we are transitioning away from that method. I have also attempted
this.driver.findElement(By.css("div[class*='img']"));
return this.driver.actions().click().perform();
but it does not seem to have any effect.
While there are numerous inquiries regarding this specific error, I have not come across any that address the need to proceed with the click operation regardless.