Skip to content

Instantly share code, notes, and snippets.

@JacobAae
Last active July 22, 2019 22:31
Show Gist options
  • Save JacobAae/76de51919d519515e0e00f4863cc63e9 to your computer and use it in GitHub Desktop.
Save JacobAae/76de51919d519515e0e00f4863cc63e9 to your computer and use it in GitHub Desktop.
Geb 3.0 standalone script in groovy (2.5.6)
@Grapes([
@Grab("org.gebish:geb-core:3.0"),
@Grab('io.github.bonigarcia:webdrivermanager:3.4.0'),
@Grab('org.seleniumhq.selenium:selenium-chrome-driver:3.141.0'),
])
import io.github.bonigarcia.wdm.WebDriverManager
import org.openqa.selenium.chrome.ChromeDriver
WebDriverManager.chromedriver().setup()
def configuration = new geb.Configuration(driver: { new ChromeDriver() })
geb.Browser.drive(configuration) {
go "https://grydeske.dk"
assert $(".topbanner h2").text() == "Home of Jacob Aae Mikkelsen"
}
println "Success :)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment