You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@groovy.apache.org by OCsite <oc...@ocs.cz> on 2021/06/13 13:25:39 UTC

Geb Safari automation

Hi there,

I'd like to use Geb for a Safari (not FF/Chrome) automation; can anyone help? I've tried steps from this article:

https://blog.codecentric.de/en/2013/02/browser-automation-and-acceptance-testing-with-geb/

just updated for Safari instead of Firefox and using current versions of the frameworks — but it does not work; it looks like not even the newest Geb supports Safari, based on the driver list?!? Searching the Web for “geb safari” I found a lot of hints it should work, but not one example howto, not even at https://gebish.org/manual/current/ — I must be missing something obvious :(

===
Groovy Shell (3.0.7, JVM: 11.0.4-BellSoft)
Type ':help' or ':h' for help.
-------------------------------------------------------------------------------------------------------------------
groovy:000> import groovy.grape.Grape
===> groovy.grape.Grape
groovy:000> Grape.grab(group:"org.gebish", module:"geb-core", version:"5.0-milestone-2")
===> null
groovy:000> Grape.grab(group:"org.seleniumhq.selenium", module:"selenium-safari-driver", version:"4.0.0-beta-4")
===> null
groovy:000> import geb.Browser
===> groovy.grape.Grape, geb.Browser
groovy:000> br = new Browser()
===> geb.Browser@9b3be1c
groovy:000> br.go "http://ocs.cz"
ERROR geb.error.UnableToLoadAnyDriversException:
Unable to load any drivers from: [org.openqa.selenium.htmlunit.HtmlUnitDriver, org.openqa.selenium.firefox.FirefoxDriver, org.openqa.selenium.ie.InternetExplorerDriver, org.openqa.selenium.chrome.ChromeDriver, org.openqa.selenium.edge.EdgeDriver]
===

Can anyone help? Thanks!
OC


Re: Geb Safari automation

Posted by Eric Berry <el...@gmail.com>.
I just started looking into this myself, and I haven't gotten this working
yet, but I came across this the other day during my initial investigation:
https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari

The Java library may need to be updated to work with Apple's own
Webdriver-Safari implementation.

On Sun, Jun 13, 2021 at 6:25 AM OCsite <oc...@ocs.cz> wrote:

> Hi there,
>
> I'd like to use Geb for a *Safari* (not FF/Chrome) automation; can anyone
> help? I've tried steps from this article:
>
>
> https://blog.codecentric.de/en/2013/02/browser-automation-and-acceptance-testing-with-geb/
>
> just updated for Safari instead of Firefox and using current versions of
> the frameworks — but it does not work; it looks like not even the newest
> Geb supports Safari, based on the driver list?!? Searching the Web for “geb
> safari” I found a lot of hints it *should* work, but not one example
> howto, not even at https://gebish.org/manual/current/ — I must be missing
> something obvious :(
>
> ===
> Groovy Shell (3.0.7, JVM: 11.0.4-BellSoft)
> Type '*:help*' or '*:h*' for help.
>
> -------------------------------------------------------------------------------------------------------------------
> *groovy:*000*>* import groovy.grape.Grape
> *===>* groovy.grape.Grape
> *groovy:*000*>* Grape.grab(group:"org.gebish", module:"geb-core",
> version:"5.0-milestone-2")
> *===>* null
> *groovy:*000*>* Grape.grab(group:"org.seleniumhq.selenium",
> module:"selenium-safari-driver", version:"4.0.0-beta-4")
> *===>* null
> *groovy:*000*>* import geb.Browser
> *===>* groovy.grape.Grape, geb.Browser
> *groovy:*000*>* br = new Browser()
> *===>* geb.Browser@9b3be1c
> *groovy:*000*>* br.go "http://ocs.cz"
> *ERROR* geb.error.UnableToLoadAnyDriversException:
> *Unable to load any drivers from:
> [org.openqa.selenium.htmlunit.HtmlUnitDriver,
> org.openqa.selenium.firefox.FirefoxDriver,
> org.openqa.selenium.ie.InternetExplorerDriver,
> org.openqa.selenium.chrome.ChromeDriver,
> org.openqa.selenium.edge.EdgeDriver]*
> ===
>
> Can anyone help? Thanks!
> OC
>
>