1

I am getting below Exception while running test scripts.

geb.driver.DriverCreationException: failed to create driver from callback 'script1501516684770944233575$_run_closure1@6601cc93'
java.lang.NoClassDefFoundError: Lorg/openqa/selenium/remote/html5/RemoteWebStorage;
failed to create driver from callback 'script1501516684770944233575$_run_closure1@6601cc93'

OS: Windows 10 64 bit Chrome browser: v60 (latest one) Selenium :-2.43.1 Chrome web driver:-2.24.417431

geb-version:0.10.0 geb-testng-version:0.13.1 geb-spoc-version:0.13.1

Thanks in Advance...!

Igor Drozdov
  • 14,690
  • 5
  • 37
  • 53
  • Possible duplicate of [Why does my Geb test return "failed to create driver from callback" even after updating my Selenium dependency in Grails?](https://stackoverflow.com/questions/30085879/why-does-my-geb-test-return-failed-to-create-driver-from-callback-even-after-u) – mrfreester Jul 31 '17 at 19:55

3 Answers3

0

This will be a version issue (your old web driver is not compatible with newer chrome versions). If you are using the latest version of chrome, I suggest moving to the latest version of selenium and chrome driver.

Infact one quick google suggests that I might be right: https://sites.google.com/a/chromium.org/chromedriver/downloads

Latest Release: ChromeDriver 2.31

Supports Chrome v58-60

Community
  • 1
  • 1
CommodoreBeard
  • 340
  • 2
  • 12
0

This error can be thrown if you do not correctly define your chrome driver location when executing your tests.

Either in your GebConfig:

driver = {
   System.setProperty('webdriver.chrome.driver', '/Users/foo/drivers/chromedriver')
   new ChromeDriver()
}

Or in something like VM parameters if running from an intelliJ Run/Debug Configuration:

-Dbrowser=chrome -Dwebdriver.chrome.driver="/Users/foo/drivers/chromedriver/chromedriver.exe"
Rushby
  • 869
  • 9
  • 18
0

I was having this problem for a couple of days and finally understand the cause. This problem occurred for me on Jenkins when I am setting my browser to chrome or firefox and then trying to run my tests. It occurred due to browsers not installed on Jenkins machine. The drivers are present in the code but the browser should be installed on machine otherwise Geb will throw this error. Hope this helps.

Varun Jain
  • 11
  • 4