Selenium "Element is not clickable at point" error in Firefox -
in regards webdriver error
element not clickable @ point (x, y). element recieve click instead.
for chromedriver, addressed @ debugging "element not clickable @ point" error, issue can occur in firefox well.
what best ways resolve when occurs in firefoxdriver?
this happens in below cases-
when element loaded dom, position not fixed on ui. there can other div or images not loaded completely.
the page getting refreshed before clicking element.
workaround
- use thread.sleep before actions on each web element in ui, not idea.
- use webdriverwait expectedconditions.
i facing same issue, page load time more , loading icon overlapping on entire web page.
to fix it, have implemented webdriverwait expectedconditions, waits loading icon disappear before performing click action on element
call function before performing action (i using data driven framework)
public void waitforloader () throws exception { try { string objectarray[]=objectreader.getobjectarray("loadingicon"); if(checkelementdisplayed(objectarray[3],objectarray[2])) { webdriverwait wait = new webdriverwait(remotewebdriver,10); wait.until(expectedconditions.invisibilityofelementlocated(by.xpath(objectarray[3]))); } } catch (nosuchelementexception e) { system.out.println("the page loaded successfully"); } }
Comments
Post a Comment