Geb and firefox 48 ?

103 views
Skip to first unread message

mand...@redhat.com

unread,
Sep 19, 2016, 11:58:30 AM9/19/16
to Geb User Mailing List
Hi,

I tried using Geb but it keeps failing for me and I reckon the reason is i'm on OSX with Firefox 48 installed. I downloaded and installed geckodriver/marionette and made it available in my PATH but to no avail. 

Anyone with some pointers on how to get Geb running with Firefox 48 on OSX ? 

Thank you,
Max

Raviteja Lokineni

unread,
Sep 19, 2016, 1:14:14 PM9/19/16
to geb-...@googlegroups.com
What are your dependencies?

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/e14ffdf1-8a90-4117-880a-5dd89e07f4d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Raviteja Lokineni | Business Intelligence Developer
TD Ameritrade


Max Andersen

unread,
Sep 19, 2016, 1:18:54 PM9/19/16
to geb-...@googlegroups.com
here is the exact snippet i'm trying to run:

@Grapes([
    @Grab("org.gebish:geb-core:0.13.1"),
    @Grab("org.seleniumhq.selenium:selenium-firefox-driver:2.53.1"),
    @Grab("org.seleniumhq.selenium:selenium-support:2.53.1")
])
import geb.Browser

import geb.Module
import geb.Page
import org.openqa.selenium.remote.DesiredCapabilities
import org.openqa.selenium.firefox.FirefoxDriver


DesiredCapabilities capabilities = DesiredCapabilities.firefox()
capabilities.setCapability("marionette", true)
driver = new FirefoxDriver(capabilities)
    
driver.drive {
   go "http://gebish.org"

    assert title == "Geb - Very Groovy Browser Automation" 

    $("#sidebar .sidemenu a", text: "jQuery-like API").click()

    assert $("#main h1")*.text() == ["Navigating Content", "Form Control Shortcuts"] 
    assert $("#sidebar .sidemenu a", text: "jQuery-like API").parent().hasClass("selected")
}


--
You received this message because you are subscribed to a topic in the Google Groups "Geb User Mailing List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geb-user/k8wWk-eTYkE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geb-user+unsubscribe@googlegroups.com.

To post to this group, send email to geb-...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Raviteja Lokineni

unread,
Sep 19, 2016, 1:33:33 PM9/19/16
to geb-...@googlegroups.com
Try with selenium version 3.0.0-beta3. Also check if you're having the latest gecko driver too. The capability marionette is not present in 2.53.

And just a FYI from the geckodriver readme: https://github.com/mozilla/geckodriver/blob/master/README.md
Marionette and geckodriver are not yet feature complete. This means it does not yet offer full conformance with the WebDriver standard or complete compatibility with Selenium.


For more options, visit https://groups.google.com/d/optout.

mand...@redhat.com

unread,
Sep 21, 2016, 3:25:54 AM9/21/16
to Geb User Mailing List
Try with selenium version 3.0.0-beta3. Also check if you're having the latest gecko driver too. The capability marionette is not present in 2.53.


error: Caught: groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.firefox.FirefoxDriver.drive() is applicable for argument types: (test$_run_closure1) values: [test$_run_closure1@6e9c413e]
Possible solutions: print(java.lang.Object), print(java.io.PrintWriter), wait(), close(), quit(), kill()
groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.firefox.FirefoxDriver.drive() is applicable for argument types: (test$_run_closure1) values: [test$_run_closure1@6e9c413e]
Possible solutions: print(java.lang.Object), print(java.io.PrintWriter), wait(), close(), quit(), kill() 
    at test.run(test.groovy:18)

is there maybe a different version of geb to try out ? 

 

And just a FYI from the geckodriver readme: https://github.com/mozilla/geckodriver/blob/master/README.md
Marionette and geckodriver are not yet feature complete. This means it does not yet offer full conformance with the WebDriver standard or complete compatibility with Selenium.

Yes, i'm very much aware of there being limits but I don't believe i'm doing anything remotely advanced here - just trying to get a basic url to open up to start.

/max 


What are your dependencies?

To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.

To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/e14ffdf1-8a90-4117-880a-5dd89e07f4d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Raviteja Lokineni | Business Intelligence Developer
TD Ameritrade


--
You received this message because you are subscribed to a topic in the Google Groups "Geb User Mailing List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geb-user/k8wWk-eTYkE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geb-user+u...@googlegroups.com.

To post to this group, send email to geb-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.

To post to this group, send email to geb-...@googlegroups.com.

Marcin Erdmann

unread,
Sep 21, 2016, 6:38:25 AM9/21/16
to Geb User Mailing List
As the exceptions suggests, there is no drive() method on the driver. You need to construct a geb.Browser instance and configure it with the driver you created:

def config = new geb.Configuration(driver: { driver })
def browser =  new geb.Browser(config)

browser.drive {
    ...
}

To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.

To post to this group, send email to geb-...@googlegroups.com.

Max Rydahl Andersen

unread,
Sep 21, 2016, 7:21:52 AM9/21/16
to Geb User Mailing List

On 21 Sep 2016, at 12:38, Marcin Erdmann wrote:

As the exceptions suggests, there is no drive() method on the driver. You
need to construct a geb.Browser instance and configure it with the driver
you created:
def config = new geb.Configuration(driver: { driver })
def browser = new geb.Browser(config)
browser.drive {
...
}

I could have sworn that worked with the previous - but maybe the code never got that far :)

Anyways, updated the code (https://gist.github.com/maxandersen/31c93efdbf9b011a8bf56a88e10290ac) and now it actually starts talking to the browser but the asserts
fails - but I reckon that could be limitations of the web driver ?

Caught: Assertion failed:

assert $("#main h1")*.text() == ["Navigating Content", "Form Control Shortcuts"]
       |              |      |
       |              |      false
       |              [What is it?, What does it look like?]
       [[[FirefoxDriver: Firefox on MAC (c8017fd1-9055-ae4d-9220-f3e19f946f46)] -> css selector: #main h1], [[FirefoxDriver: Firefox on MAC (c8017fd1-9055-ae4d-9220-f3e19f946f46)] -> css selector: #main h1]]

Assertion failed:

assert $("#main h1")*.text() == ["Navigating Content", "Form Control Shortcuts"]
       |              |      |
       |              |      false
       |              [What is it?, What does it look like?]
       [[[FirefoxDriver: Firefox on MAC (c8017fd1-9055-ae4d-9220-f3e19f946f46)] -> css selector: #main h1], [[FirefoxDriver: Firefox on MAC (c8017fd1-9055-ae4d-9220-f3e19f946f46)] -> css selector: #main h1]]

    at test$_run_closure2.doCall(test.groovy:28)
    at test$_run_closure2.doCall(test.groovy)
    at geb.Browser.drive(Browser.groovy:1061)
    at geb.Browser$drive$0.callStatic(Unknown Source)
    at geb.Browser.drive(Browser.groovy:1031)
    at geb.Browser$drive.call(Unknown Source)
    at test.run(test.groovy:21)
[Child 93260] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-rel-m64-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2046
[Child 93260] ###!!! ABORT: Aborting on channel error.: file /builds/slave/m-rel-m64-00000000000000000000/build/src/ipc/glue/MessageChannel.cpp, line 2046

On Wed, Sep 21, 2016 at 8:25 AM, <mand...@redhat.com> wrote:
Try with selenium version 3.0.0-beta3. Also check if you're having the
latest gecko driver too. The capability marionette is not present in 2.53.
I tried and it failed. Gist of what I did: https://gist.github.com/
maxandersen/31c93efdbf9b011a8bf56a88e10290ac
error: Caught: groovy.lang.MissingMethodException: No signature of
method: org.openqa.selenium.firefox.FirefoxDriver.drive() is applicable
for argument types: (test$_run_closure1) values:
[test$_run_closure1@6e9c413e]
Possible solutions: print(java.lang.Object), print(java.io.PrintWriter), wait(), close(), quit(), kill()
groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.firefox.FirefoxDriver.drive() is applicable for argument types: (test$_run_closure1) values: [test$_run_closure1@6e9c413e]
Possible solutions: print(java.lang.Object), print(java.io.PrintWriter), wait(), close(), quit(), kill()
at test.run(test.groovy:18)
is there maybe a different version of geb to try out ?
And just a FYI from the geckodriver readme:
Marionette and geckodriver are not yet feature complete. This means it
does not yet offer full conformance with the WebDriver standard
.
For more options, visit https://groups.google.com/d/optout.
--
*Raviteja Lokineni* | Business Intelligence Developer
TD Ameritrade
[image: View Raviteja Lokineni's profile on LinkedIn]
--
You received this message because you are subscribed to a topic in the
Google Groups "Geb User Mailing List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/to
pic/geb-user/k8wWk-eTYkE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/ms
gid/geb-user/CAJpE9rVLPJEd9JN8XZAcpULrsS2g-pJ3AUdrB0PGqdbCYD
.
For more options, visit https://groups.google.com/d/optout.
--
/max
--
You received this message because you are subscribed to the Google
Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/ms
gid/geb-user/CAHL%3D7Vta5M-XavT7C6CS7-c9ZrmkeBRkSrWx-m3xLoRF
.
For more options, visit https://groups.google.com/d/optout.
--
*Raviteja Lokineni* | Business Intelligence Developer
TD Ameritrade
[image: View Raviteja Lokineni's profile on LinkedIn]
You received this message because you are subscribed to the Google Groups
"Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and all its topics, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcin Erdmann

unread,
Sep 21, 2016, 7:59:59 AM9/21/16
to Geb User Mailing List
No, it looks like your test might not be correct - I'm not sure it the selector for the link you're clicking is right. I would suggest you introduce page classes with at checkers to your example - this way you will be able to check if the page changes happen as expected and errors will be thrown when trying to select elements with selectors that match nothing.

To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/geb-user/3c19fac3-4546-4939-9caf-2a6027f30e39%40googlegroups.com
--
You received this message because you are subscribed to a topic in the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and all its topics, send an email to geb-user+unsubscribe@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.

To post to this group, send email to geb-...@googlegroups.com.

Max Rydahl Andersen

unread,
Sep 21, 2016, 8:11:00 AM9/21/16
to Geb User Mailing List
On 21 Sep 2016, at 13:59, Marcin Erdmann wrote:

> No, it looks like your test might not be correct - I'm not sure it the
> selector for the link you're clicking is right. I would suggest you
> introduce page classes with at checkers to your example - this way you
> will
> be able to check if the page changes happen as expected and errors
> will be
> thrown when trying to select elements with selectors that match
> nothing.

FYI: the code I use are the exact content from the manual :)

http://www.gebish.org/manual/current/#inline-scripting

For now i'm just trying to get Geb working enough so I can use it with
asciidoctorj-screenshot extension
thus just need the basics.

/max
>> msgid/geb-user/3c19fac3-4546-4939-9caf-2a6027f30e39%40googlegroups.com
>> <https://groups.google.com/d/msgid/geb-user/3c19fac3-4546-
>> 4939-9caf-2a6027f30e39%40googlegroups.com?utm_medium=
>> email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to a topic in
>> the
>> Google Groups "Geb User Mailing List" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/
>> topic/geb-user/k8wWk-eTYkE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> geb-user+u...@googlegroups.com.
>> To post to this group, send email to geb-...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/geb-user/CA%2B52dQT9uk8PXy2Ua3wH0qjJo%2B01%2BRVx0idz%
>> 3DEvT6L5iKmQ0eA%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>> /max
>> http://about.me/maxandersen
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups
>> "Geb User Mailing List" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an
>> email to geb-user+u...@googlegroups.com.
>> To post to this group, send email to geb-...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/geb-user/27EC6136-AAF6-4436-B62C-AC352CB8EF7B%40redhat.com
>> <https://groups.google.com/d/msgid/geb-user/27EC6136-AAF6-4436-B62C-AC352CB8EF7B%40redhat.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Geb User Mailing List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/geb-user/k8wWk-eTYkE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> geb-user+u...@googlegroups.com.
> To post to this group, send email to geb-...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geb-user/CA%2B52dQRg5vuof-C2uYF8n6p79XNLOJVYQHczLiO4RkC%3DCS2Rgg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages