Last active
July 22, 2019 22:31
-
-
Save JacobAae/76de51919d519515e0e00f4863cc63e9 to your computer and use it in GitHub Desktop.
Geb 3.0 standalone script in groovy (2.5.6)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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