0
votes

While clicking on "Tab" getting following exception.

Exception in thread "main" org.openqa.selenium.WebDriverException: Element is not clickable at point (160.5, 7.5). Other element would receive the click: Command duration or timeout: 71 milliseconds Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40' System info: host: 'Saba-Aziz', ip: '10.20.30.44', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_91' Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=46.0.1, platform=WINDOWS, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] Session ID: 5d2ead97-c71c-4a86-9ffb-3e7bbb174503 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) 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.RemoteWebElement.execute(RemoteWebElement.java:327) at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:85) at WorldBankDatacls.main(WorldBankDatacls.java:56)

I have used web driver's findElement methods like XPath, Id,..etc. but no luck! Please anyone help me!

2
Share your code and website please. :-)Kishan Patel
you should try JavascriptExecutor to perform click..Saurabh Gaur
@SaurabhGaur Thanks. It works with JavascriptExecuter!Saba Malik

2 Answers

1
votes

Here you can perform click by using JavascriptExecutoras follows :-

WebElement el = webDriver.findElement(By.xpath("here is your xpath"));
JavascriptExecutor executor = (JavascriptExecutor)webDriver
executor.executeScript("arguments[0].click()", el);
0
votes

Some element which is on the top recieves click instead your tab. You should make screenshot after your click to see what is happening.