Skip to content

Commit

Permalink
Update webdriver settings (#906)
Browse files Browse the repository at this point in the history
* Update webdriver settings

* Use the command line flag --remote-allow-origins

to allow connections from all the origins.
  • Loading branch information
puneetbehl authored Aug 14, 2023
1 parent 5d35434 commit 4e05e9e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ environments {
driver = {
ChromeOptions o = new ChromeOptions()
o.addArguments('headless')
o.addArguments('--remote-allow-origins=*')
new ChromeDriver(o)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ environments {
driver = {
ChromeOptions o = new ChromeOptions()
o.addArguments('headless')
o.addArguments('--remote-allow-origins=*')
new ChromeDriver(o)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ environments {
driver = {
ChromeOptions o = new ChromeOptions()
o.addArguments('headless')
o.addArguments('--remote-allow-origins=*')
new ChromeDriver(o)
}
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ hibernateCoreVersion=5.6.15.Final
hibernatEhcacheVersion=5.6.15.Final
gebVersion=6.0
seleniumVersion=4.8.0
chromeDriverVersion=96.0.4664.45
webdriverBinariesVersion=2.7
geckodriverVersion=0.31.0
seleniumSafariDriverVersion=4.8.0
Expand Down
13 changes: 10 additions & 3 deletions gradle/geb.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ dependencies {
tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
if (!System.getenv().containsKey('CI')) {
systemProperty 'webdriver.chrome.driver', System.getProperty('webdriver.chrome.driver')
systemProperty 'webdriver.gecko.driver', System.getProperty('webdriver.gecko.driver')
} else {
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
}
}

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

0 comments on commit 4e05e9e

Please sign in to comment.