Quantcast

Geb Tests with Grails 2.3.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Geb Tests with Grails 2.3.0

mraible
I'm trying to upgrade my Grails app from 2.2.1 to 2.3.0. One issue I've facing is my Geb functional tests are having issues running. The HtmlUnit tests hang, but that appears to be because HtmlUnit isn't recommended for Geb with Grails 2.2+. So I tried the PhantomJS driver according to the following instructions:

http://fbflex.wordpress.com/2013/03/18/how-to-configure-webdriver-in-grails-for-your-geb-tests/

Using Selenium 2.31.0 and phantomjsdriver 1.0.1, this results in:

|  geb.driver.DriverCreationException: failed to create driver from callback 'script13798898672681154509289$_run_closure1@2a93a1c6'
        at geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.IllegalStateException: The path to the driver executable must be set by the phantomjs.binary.path capability/system property/PATH variable; for more information, see https://github.com/ariya/phantomjs/wiki. The latest version can be downloaded from http://phantomjs.org/download.html
        at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
        at org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:171)
        at org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:122)
        at org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:85)
        at script13798898672681154509289.run_closure1(script13798898672681154509289.groovy:14)
        at geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more

If I change the selenium-remote-driver to be 2.34.0 (as suggested in the last comment in the aforementioned post), I get:

|  geb.driver.DriverCreationException: failed to create driver from callback 'script13798899550331154509289$_run_closure1@7ef8f87a'
        at geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.NoClassDefFoundError: org/openqa/selenium/interactions/Keyboard
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
        at java.lang.Class.getDeclaredConstructors(Class.java:1853)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at script13798899550331154509289.run_closure1(script13798899550331154509289.groovy:14)
        at geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.interactions.Keyboard
        at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:175)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 16 more

If I take out transitive=false, I get the same issue.

Even stranger, for the Chrome and Firefox Drivers, I get assertion errors about titles. Chrome doesn't find them.

Starting ChromeDriver (v2.3) on port 3522
| Failure:  view homepage(happytrails.AnonymousUserSpec)
|  Assertion failed:

$('title').text() ==~ /Welcome to Happy Trails!.+/
|          |      |
|          ""     false
[[[[[ChromeDriver: chrome on MAC (19b9eac62b9fd1d1a9d3aea53655d077)] -> tag name: html]] -> css selector: title]]

        at happytrails.pages.HomePage._clinit__closure1(HomePage.groovy:6)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.view homepage(AnonymousUserSpec.groovy:14)
| Running 11 spock tests... 2 of 11

Firefox finds the title, but still fails:

| Failure:  browse regions(happytrails.AnonymousUserSpec)
|  Assertion failed:

title ==~ /Regions/
|     |
|     false
Regions | Über Tracks

        at happytrails.pages.RegionsPage._clinit__closure1(RegionsPage.groovy:9)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.browse regions(AnonymousUserSpec.groovy:23)

| Failure:  signup as a new user(happytrails.AuthenticatedUserSpec)
|  Assertion failed:

$('.ui-dialog-title').text() ==~ /Create Account!.+/
|                     |      |
|                     |      false
|                     Create Account
[[[[[FirefoxDriver: firefox on MAC (ce5efed8-1080-5047-9e5f-a4b6ba73d45e)] -> tag name: html]] -> css selector: .ui-dialog-title]]

Has anyone got their Geb functional tests to work reliably with Grails 2.3.0? If so, what versions of libraries are you using?

Thanks,

Matt


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Geb Tests with Grails 2.3.0

Graeme Rocher-2
Did you install phantomjs? I got the phantomjs error until I did:

‘brew install phantomjs’



On Mon, Sep 23, 2013 at 12:59 AM, mraible <[hidden email]> wrote:
I'm trying to upgrade my Grails app from 2.2.1 to 2.3.0. One issue I've
facing is my Geb functional tests are having issues running. The HtmlUnit
tests hang, but that appears to be because HtmlUnit isn't recommended for
Geb with Grails 2.2+. So I tried the PhantomJS driver according to the
following instructions:

http://fbflex.wordpress.com/2013/03/18/how-to-configure-webdriver-in-grails-for-your-geb-tests/

Using Selenium 2.31.0 and phantomjsdriver 1.0.1, this results in:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798898672681154509289$_run_closure1@2a93a1c6'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.IllegalStateException: The path to the driver
executable must be set by the phantomjs.binary.path capability/system
property/PATH variable; for more information, see
https://github.com/ariya/phantomjs/wiki. The latest version can be
downloaded from http://phantomjs.org/download.html
        at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:171)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:122)
        at
org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:85)
        at
script13798898672681154509289.run_closure1(script13798898672681154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more

If I change the selenium-remote-driver to be 2.34.0 (as suggested in the
last comment in the aforementioned post), I get:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798899550331154509289$_run_closure1@7ef8f87a'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.NoClassDefFoundError:
org/openqa/selenium/interactions/Keyboard
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
        at java.lang.Class.getDeclaredConstructors(Class.java:1853)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at
script13798899550331154509289.run_closure1(script13798899550331154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more
Caused by: java.lang.ClassNotFoundException:
org.openqa.selenium.interactions.Keyboard
        at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:175)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 16 more

If I take out transitive=false, I get the same issue.

Even stranger, for the Chrome and Firefox Drivers, I get assertion errors
about titles. Chrome doesn't find them.

Starting ChromeDriver (v2.3) on port 3522
| Failure:  view homepage(happytrails.AnonymousUserSpec)
|  Assertion failed:

$('title').text() ==~ /Welcome to Happy Trails!.+/
|          |      |
|          ""     false
[[[[[ChromeDriver: chrome on MAC (19b9eac62b9fd1d1a9d3aea53655d077)] -> tag
name: html]] -> css selector: title]]

        at happytrails.pages.HomePage._clinit__closure1(HomePage.groovy:6)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.view homepage(AnonymousUserSpec.groovy:14)
| Running 11 spock tests... 2 of 11

Firefox finds the title, but still fails:

| Failure:  browse regions(happytrails.AnonymousUserSpec)
|  Assertion failed:

title ==~ /Regions/
|     |
|     false
Regions | Über Tracks

        at happytrails.pages.RegionsPage._clinit__closure1(RegionsPage.groovy:9)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.browse
regions(AnonymousUserSpec.groovy:23)

| Failure:  signup as a new user(happytrails.AuthenticatedUserSpec)
|  Assertion failed:

$('.ui-dialog-title').text() ==~ /Create Account!.+/
|                     |      |
|                     |      false
|                     Create Account
[[[[[FirefoxDriver: firefox on MAC (ce5efed8-1080-5047-9e5f-a4b6ba73d45e)]
-> tag name: html]] -> css selector: .ui-dialog-title]]

Has anyone got their Geb functional tests to work reliably with Grails
2.3.0? If so, what versions of libraries are you using?

Thanks,

Matt






--
View this message in context: http://grails.1312388.n4.nabble.com/Geb-Tests-with-Grails-2-3-0-tp4649417.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Geb Tests with Grails 2.3.0

Graeme Rocher-2
I also get the same title issue with phantomjs:



On Mon, Sep 23, 2013 at 10:40 AM, Graeme Rocher <[hidden email]> wrote:
Did you install phantomjs? I got the phantomjs error until I did:

‘brew install phantomjs’



On Mon, Sep 23, 2013 at 12:59 AM, mraible <[hidden email]> wrote:
I'm trying to upgrade my Grails app from 2.2.1 to 2.3.0. One issue I've
facing is my Geb functional tests are having issues running. The HtmlUnit
tests hang, but that appears to be because HtmlUnit isn't recommended for
Geb with Grails 2.2+. So I tried the PhantomJS driver according to the
following instructions:

http://fbflex.wordpress.com/2013/03/18/how-to-configure-webdriver-in-grails-for-your-geb-tests/

Using Selenium 2.31.0 and phantomjsdriver 1.0.1, this results in:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798898672681154509289$_run_closure1@2a93a1c6'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.IllegalStateException: The path to the driver
executable must be set by the phantomjs.binary.path capability/system
property/PATH variable; for more information, see
https://github.com/ariya/phantomjs/wiki. The latest version can be
downloaded from http://phantomjs.org/download.html
        at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:171)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:122)
        at
org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:85)
        at
script13798898672681154509289.run_closure1(script13798898672681154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more

If I change the selenium-remote-driver to be 2.34.0 (as suggested in the
last comment in the aforementioned post), I get:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798899550331154509289$_run_closure1@7ef8f87a'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.NoClassDefFoundError:
org/openqa/selenium/interactions/Keyboard
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
        at java.lang.Class.getDeclaredConstructors(Class.java:1853)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at
script13798899550331154509289.run_closure1(script13798899550331154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more
Caused by: java.lang.ClassNotFoundException:
org.openqa.selenium.interactions.Keyboard
        at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:175)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 16 more

If I take out transitive=false, I get the same issue.

Even stranger, for the Chrome and Firefox Drivers, I get assertion errors
about titles. Chrome doesn't find them.

Starting ChromeDriver (v2.3) on port 3522
| Failure:  view homepage(happytrails.AnonymousUserSpec)
|  Assertion failed:

$('title').text() ==~ /Welcome to Happy Trails!.+/
|          |      |
|          ""     false
[[[[[ChromeDriver: chrome on MAC (19b9eac62b9fd1d1a9d3aea53655d077)] -> tag
name: html]] -> css selector: title]]

        at happytrails.pages.HomePage._clinit__closure1(HomePage.groovy:6)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.view homepage(AnonymousUserSpec.groovy:14)
| Running 11 spock tests... 2 of 11

Firefox finds the title, but still fails:

| Failure:  browse regions(happytrails.AnonymousUserSpec)
|  Assertion failed:

title ==~ /Regions/
|     |
|     false
Regions | Über Tracks

        at happytrails.pages.RegionsPage._clinit__closure1(RegionsPage.groovy:9)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.browse
regions(AnonymousUserSpec.groovy:23)

| Failure:  signup as a new user(happytrails.AuthenticatedUserSpec)
|  Assertion failed:

$('.ui-dialog-title').text() ==~ /Create Account!.+/
|                     |      |
|                     |      false
|                     Create Account
[[[[[FirefoxDriver: firefox on MAC (ce5efed8-1080-5047-9e5f-a4b6ba73d45e)]
-> tag name: html]] -> css selector: .ui-dialog-title]]

Has anyone got their Geb functional tests to work reliably with Grails
2.3.0? If so, what versions of libraries are you using?

Thanks,

Matt






--
View this message in context: http://grails.1312388.n4.nabble.com/Geb-Tests-with-Grails-2-3-0-tp4649417.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource



--
Graeme Rocher
Grails Project Lead
SpringSource
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Geb Tests with Grails 2.3.0

mraible
Yes, I'm able to reproduce the same title issue with PhantomJS. However, I don't see what the problem is. The error message seems to say the title exists, but the regex I'm looking for is not in it. But it is, isn't it?

| Error --Output from browse regions--
| Failure:  browse regions(happytrails.AnonymousUserSpec)
|  Assertion failed:

title ==~ /Regions/
|     |
|     false
Regions | Über Tracks

On Sep 23, 2013, at 1:48 AM, "Graeme Rocher-2 [via Grails]" <[hidden email]> wrote:

I also get the same title issue with phantomjs:



On Mon, Sep 23, 2013 at 10:40 AM, Graeme Rocher <<a href="x-msg://215/user/SendEmail.jtp?type=node&amp;node=4649427&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> wrote:
Did you install phantomjs? I got the phantomjs error until I did:

‘brew install phantomjs’



On Mon, Sep 23, 2013 at 12:59 AM, mraible <<a href="x-msg://215/user/SendEmail.jtp?type=node&amp;node=4649427&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]> wrote:
I'm trying to upgrade my Grails app from 2.2.1 to 2.3.0. One issue I've
facing is my Geb functional tests are having issues running. The HtmlUnit
tests hang, but that appears to be because HtmlUnit isn't recommended for
Geb with Grails 2.2+. So I tried the PhantomJS driver according to the
following instructions:

http://fbflex.wordpress.com/2013/03/18/how-to-configure-webdriver-in-grails-for-your-geb-tests/

Using Selenium 2.31.0 and phantomjsdriver 1.0.1, this results in:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798898672681154509289$_run_closure1@2a93a1c6'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.IllegalStateException: The path to the driver
executable must be set by the phantomjs.binary.path capability/system
property/PATH variable; for more information, see
https://github.com/ariya/phantomjs/wiki. The latest version can be
downloaded from http://phantomjs.org/download.html
        at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:171)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:122)
        at
org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:85)
        at
script13798898672681154509289.run_closure1(script13798898672681154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more

If I change the selenium-remote-driver to be 2.34.0 (as suggested in the
last comment in the aforementioned post), I get:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798899550331154509289$_run_closure1@7ef8f87a'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.NoClassDefFoundError:
org/openqa/selenium/interactions/Keyboard
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
        at java.lang.Class.getDeclaredConstructors(Class.java:1853)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at
script13798899550331154509289.run_closure1(script13798899550331154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more
Caused by: java.lang.ClassNotFoundException:
org.openqa.selenium.interactions.Keyboard
        at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:175)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 16 more

If I take out transitive=false, I get the same issue.

Even stranger, for the Chrome and Firefox Drivers, I get assertion errors
about titles. Chrome doesn't find them.

Starting ChromeDriver (v2.3) on port 3522
| Failure:  view homepage(happytrails.AnonymousUserSpec)
|  Assertion failed:

$('title').text() ==~ /Welcome to Happy Trails!.+/
|          |      |
|          ""     false
[[[[[ChromeDriver: chrome on MAC (19b9eac62b9fd1d1a9d3aea53655d077)] -> tag
name: html]] -> css selector: title]]

        at happytrails.pages.HomePage._clinit__closure1(HomePage.groovy:6)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.view homepage(AnonymousUserSpec.groovy:14)
| Running 11 spock tests... 2 of 11

Firefox finds the title, but still fails:

| Failure:  browse regions(happytrails.AnonymousUserSpec)
|  Assertion failed:

title ==~ /Regions/
|     |
|     false
Regions | Über Tracks

        at happytrails.pages.RegionsPage._clinit__closure1(RegionsPage.groovy:9)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.browse
regions(AnonymousUserSpec.groovy:23)

| Failure:  signup as a new user(happytrails.AuthenticatedUserSpec)
|  Assertion failed:

$('.ui-dialog-title').text() ==~ /Create Account!.+/
|                     |      |
|                     |      false
|                     Create Account
[[[[[FirefoxDriver: firefox on MAC (ce5efed8-1080-5047-9e5f-a4b6ba73d45e)]
-> tag name: html]] -> css selector: .ui-dialog-title]]

Has anyone got their Geb functional tests to work reliably with Grails
2.3.0? If so, what versions of libraries are you using?

Thanks,

Matt






--
View this message in context: http://grails.1312388.n4.nabble.com/Geb-Tests-with-Grails-2-3-0-tp4649417.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource



--
Graeme Rocher
Grails Project Lead
SpringSource



If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/Geb-Tests-with-Grails-2-3-0-tp4649417p4649427.html
To unsubscribe from Geb Tests with Grails 2.3.0, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Geb Tests with Grails 2.3.0

Graeme Rocher-2
Have you seen Lari's fix?:


Seems Phantom JS syntax is different?


On Tue, Sep 24, 2013 at 9:27 AM, mraible <[hidden email]> wrote:
Yes, I'm able to reproduce the same title issue with PhantomJS. However, I don't see what the problem is. The error message seems to say the title exists, but the regex I'm looking for is not in it. But it is, isn't it?

| Error --Output from browse regions--
| Failure:  browse regions(happytrails.AnonymousUserSpec)
|  Assertion failed:

title ==~ /Regions/
|     |
|     false
Regions | Über Tracks

On Sep 23, 2013, at 1:48 AM, "Graeme Rocher-2 [via Grails]" <[hidden email]> wrote:

I also get the same title issue with phantomjs:



On Mon, Sep 23, 2013 at 10:40 AM, Graeme Rocher <<a href="x-msg://215/user/SendEmail.jtp?type=node&amp;node=4649427&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> wrote:
Did you install phantomjs? I got the phantomjs error until I did:

‘brew install phantomjs’



On Mon, Sep 23, 2013 at 12:59 AM, mraible <<a href="x-msg://215/user/SendEmail.jtp?type=node&amp;node=4649427&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]> wrote:
I'm trying to upgrade my Grails app from 2.2.1 to 2.3.0. One issue I've
facing is my Geb functional tests are having issues running. The HtmlUnit
tests hang, but that appears to be because HtmlUnit isn't recommended for
Geb with Grails 2.2+. So I tried the PhantomJS driver according to the
following instructions:

http://fbflex.wordpress.com/2013/03/18/how-to-configure-webdriver-in-grails-for-your-geb-tests/

Using Selenium 2.31.0 and phantomjsdriver 1.0.1, this results in:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798898672681154509289$_run_closure1@2a93a1c6'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.IllegalStateException: The path to the driver
executable must be set by the phantomjs.binary.path capability/system
property/PATH variable; for more information, see
https://github.com/ariya/phantomjs/wiki. The latest version can be
downloaded from http://phantomjs.org/download.html
        at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:171)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:122)
        at
org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:85)
        at
script13798898672681154509289.run_closure1(script13798898672681154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more

If I change the selenium-remote-driver to be 2.34.0 (as suggested in the
last comment in the aforementioned post), I get:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798899550331154509289$_run_closure1@7ef8f87a'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.NoClassDefFoundError:
org/openqa/selenium/interactions/Keyboard
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
        at java.lang.Class.getDeclaredConstructors(Class.java:1853)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at
script13798899550331154509289.run_closure1(script13798899550331154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more
Caused by: java.lang.ClassNotFoundException:
org.openqa.selenium.interactions.Keyboard
        at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:175)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 16 more

If I take out transitive=false, I get the same issue.

Even stranger, for the Chrome and Firefox Drivers, I get assertion errors
about titles. Chrome doesn't find them.

Starting ChromeDriver (v2.3) on port 3522
| Failure:  view homepage(happytrails.AnonymousUserSpec)
|  Assertion failed:

$('title').text() ==~ /Welcome to Happy Trails!.+/
|          |      |
|          ""     false
[[[[[ChromeDriver: chrome on MAC (19b9eac62b9fd1d1a9d3aea53655d077)] -> tag
name: html]] -> css selector: title]]

        at happytrails.pages.HomePage._clinit__closure1(HomePage.groovy:6)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.view homepage(AnonymousUserSpec.groovy:14)
| Running 11 spock tests... 2 of 11

Firefox finds the title, but still fails:

| Failure:  browse regions(happytrails.AnonymousUserSpec)
|  Assertion failed:

title ==~ /Regions/
|     |
|     false
Regions | Über Tracks

        at happytrails.pages.RegionsPage._clinit__closure1(RegionsPage.groovy:9)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.browse
regions(AnonymousUserSpec.groovy:23)

| Failure:  signup as a new user(happytrails.AuthenticatedUserSpec)
|  Assertion failed:

$('.ui-dialog-title').text() ==~ /Create Account!.+/
|                     |      |
|                     |      false
|                     Create Account
[[[[[FirefoxDriver: firefox on MAC (ce5efed8-1080-5047-9e5f-a4b6ba73d45e)]
-> tag name: html]] -> css selector: .ui-dialog-title]]

Has anyone got their Geb functional tests to work reliably with Grails
2.3.0? If so, what versions of libraries are you using?

Thanks,

Matt






--
View this message in context: http://grails.1312388.n4.nabble.com/Geb-Tests-with-Grails-2-3-0-tp4649417.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource



--
Graeme Rocher
Grails Project Lead
SpringSource



If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/Geb-Tests-with-Grails-2-3-0-tp4649417p4649427.html
To unsubscribe from Geb Tests with Grails 2.3.0, click here.
NAML



View this message in context: Re: Geb Tests with Grails 2.3.0

Sent from the Grails - user mailing list archive at Nabble.com.



--
Graeme Rocher
Grails Project Lead
SpringSource
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Geb Tests with Grails 2.3.0

mraible
Yeah, I saw that. However, I don't seem to have an issue with HomePage as a class, so I don't see how Lari's fix can help. The good news is I did get things to work. I had to change my "at" in RegionsPage.groovy from:

static at = {
title ==~ /Regions/
}

to:

    static at = {
        title.startsWith('Regions')
    }

Also, strangely enough - I had to revert the suggested UserDetailsService change (from 'as User' to casting to User). It seems to work fine now w/o any changes.

My last Geb-related issue is that Signup (with Spring Security UI's plugin) fails with PhantomJS. It works fine with Chrome and Firefox, but apparently the "submit" isn't fired when running under Phantom. I tried upgrading Selenium and phantomjsdriver (from 1.0.1 to 1.0.4), but this make things better.

On Sep 24, 2013, at 12:43 AM, "Graeme Rocher-2 [via Grails]" <[hidden email]> wrote:

Have you seen Lari's fix?:


Seems Phantom JS syntax is different?


On Tue, Sep 24, 2013 at 9:27 AM, mraible <<a href="x-msg://258/user/SendEmail.jtp?type=node&amp;node=4649483&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> wrote:
Yes, I'm able to reproduce the same title issue with PhantomJS. However, I don't see what the problem is. The error message seems to say the title exists, but the regex I'm looking for is not in it. But it is, isn't it?

| Error --Output from browse regions--
| Failure:  browse regions(happytrails.AnonymousUserSpec)
|  Assertion failed:

title ==~ /Regions/
|     |
|     false
Regions | Über Tracks

On Sep 23, 2013, at 1:48 AM, "Graeme Rocher-2 [via Grails]" <[hidden email]> wrote:

I also get the same title issue with phantomjs:



On Mon, Sep 23, 2013 at 10:40 AM, Graeme Rocher <<a href="<a href="x-msg://215/user/SendEmail.jtp?type=node&amp;amp;node=4649427&amp;amp;i=0">x-msg://215/user/SendEmail.jtp?type=node&amp;node=4649427&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> wrote:
Did you install phantomjs? I got the phantomjs error until I did:

‘brew install phantomjs’



On Mon, Sep 23, 2013 at 12:59 AM, mraible <<a href="<a href="x-msg://215/user/SendEmail.jtp?type=node&amp;amp;node=4649427&amp;amp;i=1">x-msg://215/user/SendEmail.jtp?type=node&amp;node=4649427&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]> wrote:
I'm trying to upgrade my Grails app from 2.2.1 to 2.3.0. One issue I've
facing is my Geb functional tests are having issues running. The HtmlUnit
tests hang, but that appears to be because HtmlUnit isn't recommended for
Geb with Grails 2.2+. So I tried the PhantomJS driver according to the
following instructions:

http://fbflex.wordpress.com/2013/03/18/how-to-configure-webdriver-in-grails-for-your-geb-tests/

Using Selenium 2.31.0 and phantomjsdriver 1.0.1, this results in:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798898672681154509289$_run_closure1@2a93a1c6'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.IllegalStateException: The path to the driver
executable must be set by the phantomjs.binary.path capability/system
property/PATH variable; for more information, see
https://github.com/ariya/phantomjs/wiki. The latest version can be
downloaded from http://phantomjs.org/download.html
        at com.google.common.base.Preconditions.checkState(Preconditions.java:176)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:171)
        at
org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:122)
        at
org.openqa.selenium.phantomjs.PhantomJSDriver.<init>(PhantomJSDriver.java:85)
        at
script13798898672681154509289.run_closure1(script13798898672681154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more

If I change the selenium-remote-driver to be 2.34.0 (as suggested in the
last comment in the aforementioned post), I get:

|  geb.driver.DriverCreationException: failed to create driver from callback
'script13798899550331154509289$_run_closure1@7ef8f87a'
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:35)
        at
geb.driver.CachingDriverFactory.getDriver_closure3(CachingDriverFactory.groovy:80)
        at
geb.driver.CachingDriverFactory$SimpleCache.get(CachingDriverFactory.groovy:30)
        at
geb.driver.CachingDriverFactory.getDriver(CachingDriverFactory.groovy:79)
        at geb.Configuration.createDriver(Configuration.groovy:346)
        at geb.Configuration.getDriver(Configuration.groovy:335)
        at geb.Browser.getDriver(Browser.groovy:105)
        at geb.Browser.clearCookies(Browser.groovy:462)
        at geb.Browser.clearCookiesQuietly(Browser.groovy:470)
        at geb.spock.GebSpec.resetBrowser(GebSpec.groovy:45)
        at geb.spock.GebSpec.cleanupSpec(GebSpec.groovy:71)
Caused by: java.lang.NoClassDefFoundError:
org/openqa/selenium/interactions/Keyboard
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
        at java.lang.Class.getDeclaredConstructors(Class.java:1853)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at
script13798899550331154509289.run_closure1(script13798899550331154509289.groovy:14)
        at
geb.driver.CallbackDriverFactory.getDriver(CallbackDriverFactory.groovy:29)
        ... 10 more
Caused by: java.lang.ClassNotFoundException:
org.openqa.selenium.interactions.Keyboard
        at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:175)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:147)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 16 more

If I take out transitive=false, I get the same issue.

Even stranger, for the Chrome and Firefox Drivers, I get assertion errors
about titles. Chrome doesn't find them.

Starting ChromeDriver (v2.3) on port 3522
| Failure:  view homepage(happytrails.AnonymousUserSpec)
|  Assertion failed:

$('title').text() ==~ /Welcome to Happy Trails!.+/
|          |      |
|          ""     false
[[[[[ChromeDriver: chrome on MAC (19b9eac62b9fd1d1a9d3aea53655d077)] -> tag
name: html]] -> css selector: title]]

        at happytrails.pages.HomePage._clinit__closure1(HomePage.groovy:6)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.view homepage(AnonymousUserSpec.groovy:14)
| Running 11 spock tests... 2 of 11

Firefox finds the title, but still fails:

| Failure:  browse regions(happytrails.AnonymousUserSpec)
|  Assertion failed:

title ==~ /Regions/
|     |
|     false
Regions | Über Tracks

        at happytrails.pages.RegionsPage._clinit__closure1(RegionsPage.groovy:9)
        at geb.Page.verifyAt(Page.groovy:135)
        at geb.Browser.doAt(Browser.groovy:341)
        at geb.Browser.at(Browser.groovy:287)
        at geb.Browser.to(Browser.groovy:415)
        at geb.Browser.to(Browser.groovy:391)
        at geb.spock.GebSpec.methodMissing(GebSpec.groovy:51)
        at happytrails.AnonymousUserSpec.browse
regions(AnonymousUserSpec.groovy:23)

| Failure:  signup as a new user(happytrails.AuthenticatedUserSpec)
|  Assertion failed:

$('.ui-dialog-title').text() ==~ /Create Account!.+/
|                     |      |
|                     |      false
|                     Create Account
[[[[[FirefoxDriver: firefox on MAC (ce5efed8-1080-5047-9e5f-a4b6ba73d45e)]
-> tag name: html]] -> css selector: .ui-dialog-title]]

Has anyone got their Geb functional tests to work reliably with Grails
2.3.0? If so, what versions of libraries are you using?

Thanks,

Matt






--
View this message in context: http://grails.1312388.n4.nabble.com/Geb-Tests-with-Grails-2-3-0-tp4649417.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Graeme Rocher
Grails Project Lead
SpringSource



--
Graeme Rocher
Grails Project Lead
SpringSource



If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/Geb-Tests-with-Grails-2-3-0-tp4649417p4649427.html
To unsubscribe from Geb Tests with Grails 2.3.0, click here.
NAML



View this message in context: Re: Geb Tests with Grails 2.3.0



--
Graeme Rocher
Grails Project Lead
SpringSource



If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/Geb-Tests-with-Grails-2-3-0-tp4649417p4649483.html
To unsubscribe from Geb Tests with Grails 2.3.0, click here.
NAML

Loading...