I want to paramaterize GebConfig.groovy such that I can specify a RemoteWebDriver url.
I am using Gradle as my build tool.
My GebConfig.groovy looks like
import org.openqa.selenium.remote.DesiredCapabilities
import org.openqa.selenium.remote.RemoteWebDriver
driver = {
DesiredCapabilities capabilities = DesiredCapabilities.firefox()
new RemoteWebDriver(
new URL("http://xx:4444/wd/hub"), capabilities
)
}
What I want to do is to say
new URL(project.remoteURL)
Where remoteURL is passed in via the command like like
gradle test -PremoteURL=http://xx:4444/wd/hub
Is this do-able? How does GebConfig.groovy get a reference to the Gradle project? Or is there a alternative?