Cannot compile after upgrade

168 views
Skip to first unread message

medv...@gmail.com

unread,
Apr 7, 2021, 2:58:10 PM4/7/21
to Geb User Mailing List
hi,

I cannot compile after upgrade using following code:

plugins { 
 id "idea" 
 id "groovy" 
 id "com.github.erdi.webdriver-binaries" version "2.2" 
 id "com.github.erdi.idea-base" version "2.2" 
 id "geb-saucelabs" 
}
 ext { 
 drivers = ["remoteChromeK8s", 
 "sauceLabsEdgeWin10", 
 "remoteChromeCapeK8s", 
 "remoteChromeDockerStandalone"] 
 ext { 
 groovyVersion = ' 2.5.13' 
 gebVersion = '4.0' 
 seleniumVersion = '4.0.0-beta-2' 
 chromeDriverVersion = ' 89.0.4389.23' 
 firefoxDriverVersion = '0.29.0' 
 ieDriverVersion = ' 3.150.1' 
 javaxMailVersion = '1.4.7' 
 } 
 repositories { 
   jcenter() 
}

Getting this error:

Plugin [id: 'geb-saucelabs'] was not found in any of the following sources:

- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/4.8.1/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (plugin dependency must include a version number for this source)

Any ideas what could be wrong?
Thank you!

Marcin Erdmann

unread,
Apr 7, 2021, 3:09:30 PM4/7/21
to geb-...@googlegroups.com
If you are still using Gradle 3.x as you have indicated on the issue you created in the tracker then you will need to upgrade to the Gradle 6.x line if you want to upgrade to Geb 4.0. I'm not sure what would be the minimum version supported so best to just up it to the latest which is 6.8.3 and which will work for sure. Secondly, you will need to bring back the dependency on org.gebish:geb-gradle to you build script's classpath because these plugins are not published to Gradle plugin portal but they are published to Maven Central as they predate the Gradle plugin portal.

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'org.gebish:geb-gradle:4.0'
    }
}

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/eddb40c1-6c8b-4d1c-ab76-87dc1c72d0ebn%40googlegroups.com.

medv...@gmail.com

unread,
Apr 12, 2021, 2:18:58 AM4/12/21
to Geb User Mailing List
I installed gradle 7.0 and added the code:

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.gebish:geb-gradle:4.0'
}
}

plugins {
id "idea"
id "groovy"
id "com.github.erdi.webdriver-binaries" version "2.2"
id "com.github.erdi.idea-base" version "2.2"
id "geb-saucelabs"
}

repositories {
jcenter()

}

ext {
drivers = ["remoteChromeK8s",
"sauceLabsEdgeWin10",
"remoteChromeCapeK8s",
"remoteChromeDockerStandalone"]

ext {
groovyVersion = ' 2.5.13'
gebVersion = '4.0'
seleniumVersion = '4.0.0-beta-2'
chromeDriverVersion = ' 89.0.4389.23'
firefoxDriverVersion = '0.29.0'
ieDriverVersion = ' 3.150.1'
javaxMailVersion = '1.4.7'
}
}


but still get this error:

Plugin [id: 'geb-saucelabs'] was not found in any of the following sources:

- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/7.0/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (plugin dependency must include a version number for this source)
Open File

medv...@gmail.com

unread,
Apr 12, 2021, 2:22:55 AM4/12/21
to Geb User Mailing List
I get the same with gradle 6.8.3:

Plugin [id: 'geb-saucelabs'] was not found in any of the following sources:

- Gradle Core Plugins (not a core plugin, please see https://docs.gradle.org/6.8.3/userguide/standard_plugins.html for available core plugins)
- Plugin Repositories (plugin dependency must include a version number for this source)
Open File

Marcin Erdmann

unread,
Apr 12, 2021, 7:46:30 AM4/12/21
to geb-...@googlegroups.com
I would suggest sticking to Gradle 6.8.3 - the plugin is built and tested with the 6.x line so it might or might not work with 7.0. Also, because the plugin is not resolved from the portal but provided on the build script classpath you will need to use the "legacy" plugin application syntax:

apply plugin: "geb-saucelabs"

medv...@gmail.com

unread,
Apr 12, 2021, 10:58:09 AM4/12/21
to Geb User Mailing List
I managed to compile using gradle-6.8.3 and

groovyVersion = '2.5.13'
gebVersion = '4.0'
seleniumVersion = '4.0.0-beta-2'
chromeDriverVersion = '89.0.4389.23'
firefoxDriverVersion = '0.29.0'
ieDriverVersion = '3.150.0'

but noticed that .present does not work anymore, also PageChangeListener got deprecated.

I only changed the versions in order to compile succesfully, did not change the structure.

None of my testscripts work anymore, e.g.

waitFor { MasterModule.cookieButtonUserCentrics.displayed }

does not seem to be working, altough the element is shown on the screenshot, putting sleep before the waitFor does not help.

condition did not pass in 15 seconds (failed with exception)
geb.waiting.WaitTimeoutException: condition did not pass in 15 seconds (failed with exception)
at geb.waiting.Wait.waitFor(Wait.groovy:124)
at geb.waiting.DefaultWaitingSupport.doWaitFor(DefaultWaitingSupport.groovy:50)
at geb.waiting.DefaultWaitingSupport.waitFor(DefaultWaitingSupport.groovy:37)
at geb.Page.waitFor(Page.groovy:116)
at geb.Browser.methodMissing(Browser.groovy:225)
at geb.spock.GebSpec.methodMissing(GebSpec.groovy:1)
at com.bechtle.test.functional.specifications.next.shared.MasterTestSpec.Test: Initialization(MasterTestSpec.groovy:127)
Caused by: groovy.lang.MissingPropertyException: No such property: cookieButtonUserCentrics for class: com.bechtle.test.functional.modules.next.hardware.MasterModule
at com.bechtle.test.functional.specifications.next.shared.MasterTestSpec.Test: Initialization_closure36(MasterTestSpec.groovy:127)
at com.bechtle.test.functional.specifications.next.shared.MasterTestSpec.Test: Initialization_closure36(MasterTestSpec.groovy)
at geb.waiting.Wait.waitFor(Wait.groovy:113)
... 6 more

Did so many things change with Geb version 4.0?

Thank you Marcin for your support!

medv...@gmail.com

unread,
Apr 12, 2021, 12:49:28 PM4/12/21
to Geb User Mailing List
There was a mistake on my side, everything is working with the new versions.
Thank you Marcin!

Marcin Erdmann

unread,
Apr 12, 2021, 3:41:22 PM4/12/21
to geb-...@googlegroups.com
I'm glad that you managed to get it working. :)

Reply all
Reply to author
Forward
0 new messages