Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 26 additions & 67 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,85 +1,44 @@
apply plugin: "idea"

buildscript { //2
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.gebish:geb-gradle:0.10.0'
classpath 'org.gebish:geb-gradle:3.4'
classpath "com.google.guava:guava:23.0"
}
}

allprojects {
apply plugin: "groovy"
}

dependencies {
def gebVersion = "0.10.0" //Uses Binaries and not JAR
def seleniumVersion = "2.42.0"

// If using Spock, need to depend on geb-spock
testCompile "org.gebish:geb-spock:$gebVersion"
compile "org.spockframework:spock-core:0.7-groovy-2.0"
compile "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
compile "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"

}


repositories {
jcenter()
}

//don't disable test task on the root, you'll use it to run the tests locally
test {
systemProperty "geb.build.reportsDir", reporting.file("$project.buildDir/test-results/$name/geb")
systemProperty "geb.env", 'firefox' //select an env/browser for local testing
}

subprojects { project ->
apply plugin: "geb-browserstack"
apply plugin: "groovy"
apply plugin: "geb-browserstack"

browserStack {
application "https://www.google.com"
task {
testClassesDir = rootProject.test.testClassesDir
testSrcDirs = rootProject.test.testSrcDirs
classpath = rootProject.test.classpath
dependencies {
def gebVersion = "3.4" //Uses Binaries and not JAR
def seleniumVersion = "3.141.59"

systemProperty "geb.build.reportsDir", reporting.file("$project.buildDir/test-results/$name/geb")
}
account {
username = "<username>"
accessKey = "<automate-key>"
}
//tunnelJar = new File(project.buildDir, "tunnel.jar")
}
// If using Spock, need to depend on geb-spock
implementation "org.gebish:geb-spock:$gebVersion"
implementation "org.spockframework:spock-core:1.3-groovy-2.5"
implementation "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
implementation "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
implementation 'org.codehaus.groovy:groovy-all:2.5.11'
}

project('firefox') {
browserStack {
browsers {
firefox_windows
}
account {
localId = 'ff'
}
task {
systemProperty 'browserstack.localIdentifier', 'ff'
}
browserStack {
application "https://www.google.com"
task {
systemProperty "geb.build.reportsDir", reporting.file("$project.buildDir/test-results/$name/geb")
}
}

project('chrome') {
browserStack {
browsers {
chrome_mac
}
account {
localId = 'chr'
}
task {
systemProperty 'browserstack.localIdentifier', 'chr'
}
browsers {
firefox_mac_19
chrome_mac
}
account {
username = System.getenv('BROWSERSTACK_USERNAME')
accessKey = System.getenv('BROWSERSTACK_ACCESS_KEY')
}
//tunnelJar = new File(project.buildDir, "tunnel.jar")
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Jul 08 01:12:31 IDT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-2.0-all.zip
117 changes: 69 additions & 48 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 24 additions & 10 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/test/groovy/GoogleSpec.groovy
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import spock.lang.*
import geb.*
import geb.spock.*
import org.openqa.selenium.Keys

class GoogleSpec extends GebReportingSpec {

Expand All @@ -9,7 +10,9 @@ class GoogleSpec extends GebReportingSpec {
to GoogleHomePage

and:
q = "BrowserStack"
def q = $("input", name: "q")
q << "BrowserStack"
q << Keys.ENTER

then:
waitFor { at GoogleResultsPage }
Expand Down
Loading