Skip to content

Commit

Permalink
test(deps): udpate webdriver binaries to 3.2
Browse files Browse the repository at this point in the history
* Update `webdriver-binaries` gradle plugin to 3.2
* Fixes #184 `java.lang.NoClassDefFoundError: org/openqa/selenium/interactions/HasTouchScreen` by forcing seleniumVersion. This is due to conflict in the selenium libraries.
  • Loading branch information
puneetbehl committed Mar 17, 2024
1 parent ce2ea5e commit 4962f4b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
30 changes: 18 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,34 @@ buildscript {
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsGradlePluginVersion"
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.6.1'
classpath "gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
classpath "com.github.erdi:webdriver-binaries-gradle-plugin:$webdriverBinariesVersion"
}
}

version project.projectVersion
group "org.grails.plugins"
version project.projectVersion

apply plugin:"eclipse"
apply plugin:"idea"
apply plugin: "com.github.erdi.webdriver-binaries"
apply from:"https://raw.githubusercontent.com/grails/grails-common-build/master/common-docs.gradle"
apply from:"https://raw.githubusercontent.com/grails/grails-common-build/v2.0.3/common-docs.gradle"
apply plugin:"org.grails.grails-plugin"
apply plugin:"org.grails.internal.grails-plugin-publish"

repositories {
maven { url "https://repo.grails.org/grails/core" }
}

configurations {
all {
resolutionStrategy.eachDependency { DependencyResolveDetails details->
if (details.requested.group == 'org.seleniumhq.selenium') {
details.useVersion(seleniumVersion)
}
}
}
}

dependencies {
api "org.springframework.boot:spring-boot-starter-logging"
api "org.springframework.boot:spring-boot-autoconfigure"
Expand Down Expand Up @@ -64,25 +74,22 @@ dependencies {
testImplementation "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-support:$seleniumVersion"


api "com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2"


}

apply from: rootProject.file('gradle/testVerbose.gradle')

webdriverBinaries {
if (!System.getenv().containsKey('GITHUB_ACTIONS')) {
if (!System.getenv().containsKey('CI')) {
chromedriver "$chromeDriverVersion"
geckodriver "$geckodriverVersion"
}
}

tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env', 'chromeHeadless')
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")

if (!System.getenv().containsKey('GITHUB_ACTIONS')) {
if (!System.getenv().containsKey('CI')) {
systemProperty 'webdriver.chrome.driver', System.getProperty('webdriver.chrome.driver')
systemProperty 'webdriver.gecko.driver', System.getProperty('webdriver.gecko.driver')
} else {
Expand All @@ -101,8 +108,7 @@ bootRun {
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
// enable if you wish to package this plugin as a standalone application
bootJar.enabled = false

grailsPublish {
userOrg = 'grails'
githubSlug = 'grails/grails-cache'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ guide=../../guide
tags=../ref/Tags
gebVersion=6.0
seleniumVersion=4.16.1
webdriverBinariesVersion=2.7
webdriverBinariesVersion=3.2
hibernateCoreVersion=5.1.5.Final
geckodriverVersion=0.32.2
seleniumSafariDriverVersion=4.16.1
Expand Down

0 comments on commit 4962f4b

Please sign in to comment.