Skip to content

Instantly share code, notes, and snippets.

@wooyoung85
Created April 3, 2018 14:03
Show Gist options
  • Save wooyoung85/ec3ed3084ad16f85a176f8f2bf5b0310 to your computer and use it in GitHub Desktop.
Save wooyoung85/ec3ed3084ad16f85a176f8f2bf5b0310 to your computer and use it in GitHub Desktop.
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
import org.openqa.selenium.firefox.FirefoxDriver
waiting {
timeout = 2
}
environments {
// run via “./gradlew chromeTest”
// See: http://code.google.com/p/selenium/wiki/ChromeDriver
chrome {
driver = { new ChromeDriver() }
}
// run via “./gradlew chromeHeadlessTest”
// See: http://code.google.com/p/selenium/wiki/ChromeDriver
chromeHeadless {
driver = {
ChromeOptions o = new ChromeOptions()
o.addArguments('headless')
new ChromeDriver(o)
}
}
// run via “./gradlew firefoxTest”
// See: http://code.google.com/p/selenium/wiki/FirefoxDriver
firefox {
atCheckWaiting = 1
driver = { new FirefoxDriver() }
}
}
// To run the tests with all browsers just run “./gradlew test”
baseUrl = "http://localhost:8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment