Recently I am facing the below issue with one of my job executions.
Below is the exception msg:
groovy.lang.MissingMethodException: No signature of method: io.github.bonigarcia.wdm.ChromeDriverManager.clearResolutionCache() is applicable for argument types: () values: []
at script1677201791728558065883.run_closure1$_closure3(script1677201791728558065883.groovy:20)
at script1677201791728558065883.run_closure1$_closure3(script1677201791728558065883.groovy)
at groovy.util.ConfigSlurper.parse_closure5(ConfigSlurper.groovy:242)
at groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:46)
at groovy.lang.Script.invokeMethod(Script.java:80)
at script1677201791728558065883.run_closure1(script1677201791728558065883.groovy:16)
at script1677201791728558065883.run_closure1(script1677201791728558065883.groovy)
at groovy.util.ConfigSlurper.parse_closure5(ConfigSlurper.groovy:225)
at script1677201791728558065883.run(script1677201791728558065883.groovy:14)
at groovy.util.ConfigSlurper.parse_closure5(ConfigSlurper.groovy:270)
at groovy.util.ConfigSlurper.parse(ConfigSlurper.groovy:288)
at groovy.util.ConfigSlurper.parse(ConfigSlurper.groovy:162)
at groovy.util.ConfigSlurper.parse(ConfigSlurper.groovy:151)
at geb.ConfigurationLoader.loadRawConfig(ConfigurationLoader.groovy:303)
It is working previously. Now my scripts are running but only 40% of them are running. and few are failing with
classMethod FAILED geb.error.UnableToLoadException: Unable to load configuration @ 'file:/C:/Users//B2B-AUTO/QA1/build/resources/test/GebConfig.groovy' (with environment: chrome) at geb.ConfigurationLoader.loadRawConfig(ConfigurationLoader.groovy:293)
How to fix this issue. let me know if you need more detail. please share your thoughts
It looks like you are trying to call a method from a newer version of the library.
clearResolutionCache()does NOT exist in versions prior to 4.0.0, and given the package name you posted it seems like you are on version 3.8.1 or earlier.It looks like ChromeDriverManager is in a different package than the one you listed. Here is the latest API:
https://javadoc.io/static/io.github.bonigarcia/webdrivermanager/5.2.3/io/github/bonigarcia/wdm/managers/ChromeDriverManager.html
Notice the package is:
io.github.bonigarcia.wdm.managers.ChromeDriverManager
You have:
io.github.bonigarcia.wdm.ChromeDriverManager
Here are the docs from 3.8.1 and you can see
clearResolutionCachedoes not exist:https://javadoc.io/doc/io.github.bonigarcia/webdrivermanager/3.8.1/index.html
If you want to use
clearResolutionCache()you'll have to upgrade your driver to 4.0.0+