Hi, I am getting the "ElementClickInterceptedException" error can you please review the attached code and help me resolve this issue.
The following exception is received when I execute the attached code.
Exception in thread "main" org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element <i class="glyphicon glyphicon-chevron-left"></i> is not clickable at point (806, 411). Other element would receive the click: <button type="button" class="btn btn-default btn-sm pull-left" ng-click="move(-1)" tabindex="-1">...</button>
(Session info: chrome=76.0.3809.132)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'Vis-MacBook-Air.local', ip: 'fe80:0:0:0:1c8b:74a2:dd93:9993%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_144'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 76.0.3809.132, chrome: {chromedriverVersion: 76.0.3809.126 (d80a294506b4..., userDataDir: /var/folders/l7/3s176lr568s...}, goog:chromeOptions: {debuggerAddress: localhost:58458}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
Session ID: cef92197b548c9f0bdf667983edda8bc
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:423)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)
at webdriver.Icici_autoLoan.main(Icici_autoLoan.java:85)
Instructor
Ashish Thakur Replied on 02/09/2019
Generally this happens if element is out of view
Use javascript executor and scroll to the element
Can you please share the exact code. I tried adding the below code, it didn't work.
WebElement element = driver.findElement(By.xpath("//*[@id='check-eligibility-page']/div[4]/div/div/form/div[6]/div[2]/div[1]/span[1]/div[1]/ul/li[1]/div/table/thead/tr/th[1]/button/i[@class='glyphicon glyphicon-chevron-left']"));
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", element);
Thread.sleep(500);
its looping the two digits below
Sep 02, 2019 5:53:42 PM org.openqa.selenium.remote.ProtocolHandshake create session
INFO: Detected dialect: W3C
26/Dec/1955
1969
1980
1969
1980
1969
I fixed the issue. This can be closed.
Thanks.