Reputation: 11
I am quite new to the groovy and trying to set up a maven project to automate the web applications using Geb-Groovy-Maven. So far I have completed the following steps:
Created a Groovy project in Eclipse and configured it as Maven project. (Groovy has been installed on eclipse and I've confirmed that programs are running successfully.)
Configured the pom.xml file by adding all the required dependencies.
Created a new groovy class by right clicking on src file. Wrote the script to launch the webdriver using Geb.
import geb.Browser
import org.openqa.selenium.firefox.FirefoxDriver
def browser = new Browser(driver: new FirefoxDriver())
Code:
Error message:
Upvotes: 0
Views: 873
Reputation: 1
I've had the same problem with Groovy while studying Spring and trying Groovy code examples from the book. Thanks to emilles here, I've managed to fix the problem.
I have:
'groovy'
plugin defined in my Gradle script,'org.codehaus.groovy:groovy-all:3.0.12'
as a Gradle dependency.In project settings, the Groovy compiler version is 3.0.
What actually helped: Window > Preferences > Groovy > Compiler > Switch to 3.0.11
.
Upvotes: 0