Hello everyone!
I am new to Geb, and when I tried to use it I found it a bit hard to work productively without syntax highlighting, type inferring and navigation support. Originally I was using Eclipse, then found
http://www.gebish.org/manual/0.10.0/ide-and-typing.html and tried IDEA Community Edition. It also did not satisfy me.
Out-of-the-box IDEA supports elements defined in static content block in Page subclasses and that is good, but in Test cases they remain unresolved:
to MyPage
testMethod()
testContent.click()
As described in the documentation, it works if you write
MyPage myPage = to MyPage
myPage.testMethod()
myPage.testContent.click()
But that is more difficult to read. I also found possible syntax
to MyPage with {
testMethod()
testContent.click()
}
A bit better, but not perfect, cause might lead to several nested with-blocks.
So I decided to start a new small project and implement improved Geb support in IDEA using GDSL feature. Meet Geb-GDSL:
Now it supports the case described above. But I still don't know what cases are widespread in production Geb usage. So for those Geb users who already use IDEA for tests authoring I suggest to try Geb-GDSL. Github Issues with test-cases, pull-requests or any other feedback are welcome.
Regards, Vladimir