0

i am trying to automate a web base application but due to the huge Ajax calls i get an exception even the element still exist on web page my i think due to the Dom code is executed before page load completion even i am using different wait method but all in vain :

Exception in thread "main" Starting ChromeDriver 2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f) on port 2530
Only local connections are allowed.
Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not visible
  (Session info: chrome=64.0.3282.186)
  (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 17 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'lt07', ip: '192.168.0.186', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_101'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f), userDataDir=C:\Users\NATASH~1\AppData\Local\Temp\scoped_dir1812_20595}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=64.0.3282.186, platform=WIN8_1, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]
Session ID: e7deaa74b472d878c9f9f99d5a77fe9a
    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 Cancel.main(Cancel.java:141)
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

2

The error says it all :

Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: element not visible
  (Session info: chrome=64.0.3282.186)
  (Driver info: chromedriver=2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 17 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'lt07', ip: '192.168.0.186', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_101'
Driver info: org.openqa.selenium.chrome.ChromeDriver

Your main issue is the version compatibility between the binaries you are using as follows :

  • You are using chromedriver=2.33
  • Release Notes of chromedriver=2.33 clearly mentions the following :

Supports Chrome v60-62

  • You are using chrome=64.0
  • Release Notes of ChromeDriver v2.35 clearly mentions the following :

Supports Chrome v62-64

  • Your Selenium Client version is 2.53.1 of 2016-06-30 17:37:03 which is almost 2 years older.
  • Your JDK version is 1.8.0_101 which is pretty ancient.

So there is a clear mismatch between the JDK v8u101 , Selenium Client v2.53.1 , ChromeDriver version (v2.33) and the Chrome Browser version (v64.0)

Solution

  • Upgrade JDK to recent levels JDK 8u162.
  • Upgrade Selenium to current levels Version 3.9.1.
  • Upgrade ChromeDriver to ChromeDriver v2.35 level.
  • Keep Chrome version at Chrome v64.x levels. (as per ChromeDriver v2.35 release notes)
  • Clean your Project Workspace and Rebuild your project with required dependencies only.
  • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
  • If your base Chrome version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Chrome.
  • Execute your @Test.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352