Selenium - element not visible - vertical scroll bar

38 views
Skip to first unread message

karthik raja

unread,
Oct 4, 2017, 5:49:38 PM10/4/17
to Selenium Users
Dear Friends,

I'm getting the 'element not visible exception.   I was able to populate other data (from the excel) into the website, however, im stuck at a point where the user needs to scroll down the vertical scroll bar and click on 'complete registration' submit button displayed at the bottom of the screen.  Btw the screen size is already being maximized.

I have tried few options but with no luck.

It would be really great if someone could shed some light as I need to close this requirement in couple of days time

Kindly do the needful

Thanks,
Karthik



--

org.openqa.selenium.ElementNotVisibleException: element not visible

  (Session info: chrome=58.0.3029.96)

  (Driver info: chromedriver=2.29.461591 (62ebf098771772160f391d75e589dc567915b233),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 30 milliseconds

Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'

System info: host: 'LSTK30027', ip: '10.21.141.14', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'

Driver info: org.openqa.selenium.chrome.ChromeDriver

Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.29.461591 (62ebf098771772160f391d75e589dc567915b233), userDataDir=C:\Users\KARAJA~1\AppData\Local\Temp\scoped_dir4144_7130}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=58.0.3029.96, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]

Session ID: 0566fb454af2798885e0e993b82c9e37

       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.ErrorHandler.createThrowable(ErrorHandler.java:216)

       at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)

       at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:638)

       at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:274)

       at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:84)

       at arcbs.BCS.SMTDeclareu.enterregincompregbuttn(SMTDeclareu.java:369)

       at arcbs.BCS.testinternal.SMTCon1(testinternal.java:85)

       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

       at java.lang.reflect.Method.invoke(Method.java:498)

       at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)

       at org.testng.internal.Invoker.invokeMethod(Invoker.java:661)

       at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)

       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)

       at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)

       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)

       at org.testng.TestRunner.privateRun(TestRunner.java:744)

       at org.testng.TestRunner.run(TestRunner.java:602)

       at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)

       at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)

       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)

       at org.testng.SuiteRunner.run(SuiteRunner.java:289)

       at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)

       at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)

       at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)

       at org.testng.TestNG.runSuitesLocally(TestNG.java:1226)

       at org.testng.TestNG.runSuites(TestNG.java:1144)

       at org.testng.TestNG.run(TestNG.java:1115)

       at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)

       at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)

       at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

 

 

===============================================

    Default test

    Tests run: 1, Failures: 1, Skips: 0

===============================================

 

 

===============================================

Default suite

Total tests run: 1, Failures: 1, Skips: 0

===============================================

Bala chandra sekhar Jasty

unread,
Oct 4, 2017, 6:06:04 PM10/4/17
to seleniu...@googlegroups.com
Hi, I am not sure which element is not visible. you might want to troubleshoot that first.

if you are looking for scrolling then below should help.

1. ((JavascriptExecutor) driver).executeScript("window.scrollTo(0,document.body.scrollHeight)");

or

2. JavascriptExecutor jse = (JavascriptExecutor) driver;
jse.executeScript("scroll(0,300);"); 



Thanks,
Bala

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/245687da-4d87-4e6c-8d9f-4864e750eb86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

karthik raja

unread,
Oct 4, 2017, 9:54:49 PM10/4/17
to seleniu...@googlegroups.com
Thanks Bala,.  I'm aware of the element which is not being visible also I have already tried with the JavascriptExecutor but with no luck.

Any other logic that I could try for this scenario?

Appreciate your help.

Thanks in advance,
Karthik




Thanks,
Bala


To post to this group, send email to seleniu...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/RQbhRkiqX_o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-users+unsubscribe@googlegroups.com.

To post to this group, send email to selenium-users@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages