Reputation: 1980
I am getting following error while running selenium testcases. Using the versions firefox 45 and selenium-server-standalone 2.52.
org.openqa.selenium.WebDriverException: Element is not clickable at point (62, 13.333328247070312). Other element would receive the click:
(WARNING: The server did not provide any stacktrace information) Command duration or timeout: 21 milliseconds Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42' System info: host: 'mesos-wl-servicetest-8f2fe7b6-d8bd-429f-abfc-cf5d29242b38', ip: '172.31.6.249', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.2-1.el7.elrepo.x86_64', java.version: '1.8.0_51' Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities [{applicationCacheEnabled=true, rotatable=false, pageLoadStrategy=fast, handlesAlerts=true, databaseEnabled=true, version=45.1.0, platform=LINUX, nativeEvents=false, acceptSslCerts=false, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, pageLoadingStrategy=fast, cssSelectorsEnabled=true}] Session ID: d6ae5f7f-be19-4b79-b248-dfb034d6ce1c at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35) at org.openqa.selenium.remote.RemoteMouse.click(RemoteMouse.java:59) at org.openqa.selenium.interactions.ClickAction.perform(ClickAction.java:37) at org.openqa.selenium.interactions.CompositeAction.perform(CompositeAction.java:50) at org.openqa.selenium.interactions.Actions.perform(Actions.java:373)
Upvotes: 0
Views: 217
Reputation: 1
Possible solutions can be ..
1)Try to maximize the browser when you are working with resolutions greater than 1024x768.
driver.manage().window().maximize();
2) Using Actions Class
WebElement element = driver.findElement(By("element"));
Actions action = new Actions(driver);
action.moveToElement(element).click().perform();
3) using JavaScriptExecutor
WebElement el = driver.findElement(By("element"));
JavascriptExecutor executor = (JavascriptExecutor)driver
executor.executeScript("arguments[0].click()", el);
Upvotes: 0
Reputation: 31
JavascriptExecutor click is an good option to avoid element is not clickable at point (xx,yy). Other element would receive the click.
ANother alternate that you can use is explicit wait for presence of that element
Upvotes: 0
Reputation: 23805
You should try using JavascriptExecutor
WebElement el = driver.findElement....;
JavascriptExecutor executor = (JavascriptExecutor)driver
executor.executeScript("arguments[0].click()", el);
Hope it will help you to perform click
...:)
Upvotes: 1