Module 14: Exception could not be scrolled into view (Box Specific Link) | Selenium Forum
R
Roshan Karkera Posted on 16/05/2020

Dear Sir,

 

I am at Module 14-Part4 where we need to find specific link from Box Content of CNN Website, i am getting error when loop goes for links. I tried your code as welll and it seems it is giving error when it goes to For Loop for when link has to be clicked.

 

I am stuck here, please help. PFA Screenshot.

Module 14 : Prg Name: CNN_Specific_Links.java

Below Exception Log:

Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: Element <a href="/2020/05/15/football/bundesliga-return-soccer-safety-spt-intl/index.html"> could not be scrolled into view
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'DESKTOP-6UM9H02', ip: '192.168.0.105', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_231'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 76.0.1, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20200507114007, moz:geckodriverVersion: 0.26.0, moz:headless: false, moz:processID: 32016, moz:profile: C:\Users\krosh\AppData\Loca..., moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, platformVersion: 10.0, rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
Session ID: 66971aa1-5aba-4454-b03f-505d42537e6b
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.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 CNN_Specific_Links.main(CNN_Specific_Links.java:33)


A
Ashish Thakur Replied on 18/05/2020

Well you will have to scroll to this element, make it available in view and then interact with it

Scroll down a bit using javascript executor and actions class and try


R
Roshan Karkera Replied on 08/07/2020

This is now resolved


Related Posts