It looks like the Geckodriver for Firefox browser has not been ready yet?

1,599 views
Skip to first unread message

SeleniumWhat?

unread,
Aug 18, 2017, 10:21:12 PM8/18/17
to Serenity BDD Users Group
  Hi All,
  I tried out the latest versions of Gecko Driver and FF v55 as well as selenium-sever-standalone and I got this error message:

[main] ERROR net.thucydides.core.webdriver.WebDriverFacade - FAILED TO CREATE NEW WEBDRIVER_DRIVER INSTANCE class org.openqa.selenium.firefox.FirefoxDriver: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.


 But I do not see - before this error - how Gecko Driver activates the selenium-server-standalone.  I expect to see some message like this:

 

  <some server session ID> Marionette  INFO Listening on port <some port number>


 I do not know what actually took place but my guess is that Gecko Driver failed to kick off the selenium-server-standalone and thus it rendered the FF session useless?  I wish I could know how to debug the execution... arggg!!!!


  The error message above suggests that the "WebDriverFacade" was trying to take over the FireFox Driver via Gecko Driver and it failed (?).


   Have anyone succeeded getting these things run together?


   Any one knows if the Gecko Driver v 0.18 works with FF v55.x?  or they are still in the trial phase?

  

   Any one kind enough to share your working versions and your POM.xml?


  Thanks a lot guys!  And have a good nite and good weekend!  I give it up for now ;-).  Will be back :-)

  

 J.N

  PS: I'll still trying to figure how John's sample demo works with Chrome Driver first.. then hopefully I can figure out how the Gecko Driver works with FF v55 and selenium-server-standalone v3.5.x


  

   

 

 


  



Baskar chinnakonda

unread,
Aug 19, 2017, 12:00:53 AM8/19/17
to Serenity BDD Users Group
Instead of  selenium-server-standalone v3.5.x Use v3.4 - this will work

SeleniumWhat?

unread,
Aug 19, 2017, 12:06:22 AM8/19/17
to Serenity BDD Users Group
Bakska,
  Thanks for the tip.  Will do!
  J.N

SeleniumWhat?

unread,
Aug 19, 2017, 12:14:22 AM8/19/17
to Serenity BDD Users Group
Hi Baksa,
  It still failed with the same error message.
  Would you kindly share your working configuration (POM.xml)?
  Thanks
  J.N

John Smart

unread,
Aug 19, 2017, 3:18:29 AM8/19/17
to SeleniumWhat?, Serenity BDD Users Group
What OS are you on?

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better
http://johnfergusonsmart.com  |  john....@wakaleo.com
___________________________________________________

We love breaking down silos and helping smart teams collaborate better! Ask about our tailored on-site workshops in Agile Product Planning, BDD Requirements Discovery,  BDD, TDD and Clean Coding, and Advanced BDD Test Automation.

Need some help with Serenity BDD? Check out our Serenity BDD training and support packages here.
___________________________________________________

Baskar chinnakonda

unread,
Aug 19, 2017, 4:26:33 AM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com
This is working for me... please try this


<?xml version="1.0" encoding="UTF-8"?>
<modelVersion>4.0.0</modelVersion>
<groupId>com.gehc.cb.bdd</groupId>
<artifactId>serenitybdd</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Sample Serenity project using Cucumber and WebDriver</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<serenity.version>1.5.4-rc.2</serenity.version>
        <serenity.maven.version>1.5.3</serenity.maven.version>
        <serenity.cucumber.version>1.5.4</serenity.cucumber.version>
</properties>
<repositories>
  <repository>
     <id>smartbear</id>
     <name>SmartBear Repository</name>
  </repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency> 
             <groupId>org.seleniumhq.selenium</groupId> 
<artifactId>selenium-java</artifactId> 
<version>3.5.1</version> 
</dependency> 
<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>23.0</version>
</dependency>

<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>${serenity.cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
       <groupId>info.cukes</groupId>
       <artifactId>gherkin</artifactId>
       <version>2.12.2</version>
        </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.lambdaj</groupId>
<artifactId>lambdaj</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
   <dependency>
    <groupId>com.smartbear.soapui</groupId>
    <artifactId>soapui</artifactId>
    <version>5.2.1</version>
   </dependency>
<dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpcore</artifactId>
       <version>4.4.4</version>
</dependency>
<dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
            <version>3.3</version>
        </dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skip>true</skip>
           <argLine>-Xmx1024m</argLine>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<includes>
<include>**/*Test.java</include>
<include>**/*TestSuite.java</include>
<include>**/Test*.java</include>
<include>**/When*.java</include>
</includes>
<argLine>-Xmx512m</argLine>
<systemPropertyVariables>
<webdriver.driver>${webdriver.driver}</webdriver.driver>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.version}</version>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>





On Saturday, 19 August 2017 12:48:29 UTC+5:30, John Smart wrote:
What OS are you on?
On 19 August 2017 at 05:14, 'SeleniumWhat?' via Serenity BDD Users Group <thucydid...@googlegroups.com> wrote:
Hi Baksa,
  It still failed with the same error message.
  Would you kindly share your working configuration (POM.xml)?
  Thanks
  J.N

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.

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

SeleniumWhat?

unread,
Aug 19, 2017, 9:48:01 AM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com

  Hi John,
  I'm on macOS Sierra version 10.12.2
  In next post, I will list the details of my system config so you can help diagnose the problems. 
  Thanks a lot John!
  J.N
 

John Smart

unread,
Aug 19, 2017, 9:50:32 AM8/19/17
to SeleniumWhat?, Serenity BDD Users Group
Place the Mac OS binaries for Chrome Driver (chromedriver_mac64.zip) and GeckoDriver (geckodriver-v0.18.0-macos.tar.gz) in /usr/local/bin.

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SeleniumWhat?

unread,
Aug 19, 2017, 9:51:21 AM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com

Hi Baska,
  Thanks a lot for your working POM.xm.  I'll try it out.
  It looks like I need some update on other libs.
  I also recognize that you use the SOAP for your WS testing.  It's quite  interesting.... I need to learn how to do that too :-).  Might need you help to guide me through the WS testing.  
  J.N

SeleniumWhat?

unread,
Aug 19, 2017, 10:03:44 AM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com

Hi Baska,
  You defined this

  <systemPropertyVariables>

     <webdriver.driver>${webdriver.driver}</webdriver.driver>

 </systemPropertyVariables>

 

but you did not state what type of "${webdriver.driver}" is in the POM.xml.  I'm wondering where you defined it or you just missed the declaration of the web driver type?  Or you read it from the "serenity.properties" files?  I have not run against your POM.xml yet... just curious how to did that?

  Will let you know of my testing of your POM.xml.

  Thanks again!

  J.N



SeleniumWhat?

unread,
Aug 19, 2017, 10:41:18 AM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com
 Hi Baska,
  Tried it out.  It gets better but still it was not able to kick of the Marionette server.  it's getting better though.  The FF browser it brings up is active now.  It seems to be able to hook the browser session to some kind of server(?).  I can search the web via that browser instance(session).
  Here is the error messages (first few lines), may be John can help!.:
  It is possible that the OS is the problem here.  I'm using macOS Sierra v10.X.
  
=============

[main] ERROR net.thucydides.core.webdriver.WebDriverFacade - FAILED TO CREATE NEW WEBDRIVER_DRIVER INSTANCE class org.openqa.selenium.firefox.FirefoxDriver: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (Timed out waiting 45 seconds for Firefox to start.

Build info: version: '3.5.1', revision: '9c21bb67ef', time: '2017-08-17T15:26:08.955Z'

System info: host: 'Macbook.home', ip: 'fe80:0:0:0:1836:365d:3d12:7f0%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.2', java.version: '1.8.0_144'

Driver info: driver.version: FirefoxDriver

net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (Timed out waiting 45 seconds for Firefox to start.

Build info: version: '3.5.1', revision: '9c21bb67ef', time: '2017-08-17T15:26:08.955Z'

System info: host: 'Macbook.home', ip: 'fe80:0:0:0:1836:365d:3d12:7f0%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.2', java.version: '1.8.0_144'

Driver info: driver.version: FirefoxDriver

at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:135)


=============
  J.N
  

John Smart

unread,
Aug 19, 2017, 10:42:38 AM8/19/17
to SeleniumWhat?, Serenity BDD Users Group
Did you place the geckodriver binary in /usr/local/bin? Can you run "geckodriver --version" from the command line?

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.

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

SeleniumWhat?

unread,
Aug 19, 2017, 2:25:43 PM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com

Hi John,
  Sorry to get back to you this late.  Was out to lunch.
  No I have not got a chance to do that yet; however the OS does see the driver files which i placed under the "Applications" folder and in the $PATH
  1 - For Gecko Driver;
   - Macbook:~ john$ which geckodriver

/Applications/geckodriver

Macbook:~ john$ geckodriver --version

geckodriver 0.18.0


The source code of this program is available from

testing/geckodriver in https://hg.mozilla.org/mozilla-central.


This program is subject to the terms of the Mozilla Public License 2.0.

You can obtain a copy of the license at https://mozilla.org/MPL/2.0/.

Macbook:~ john$ geckodriver

1503166983880 geckodriver INFO geckodriver 0.18.0

1503166983890 geckodriver INFO Listening on 127.0.0.1:4444


2 - For Chrome Driver:

Macbook:~ john$ which chromedriver

/Applications/chromedriver

Macbook:~ john$ chromedriver --version

ChromeDriver 2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b)

Macbook:~ john$ chromedriver

Starting ChromeDriver 2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b) on port 9515

Only local connections are allowed.


 So... I will move them to the the /user/local/bin as you suggested and see if Serenity can pick them up

 Will let you know the results

 Thanks for your help John!

  J.N


SeleniumWhat?

unread,
Aug 19, 2017, 2:45:10 PM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com
Hi John,
  
  Like the previous test results, Serenity was able to kick off the chrome driver server, bing up the chrome browser and goto the desired base URL, but then it erred out real quick.

  Here is the first few lines of error messages:

================

@cucumber

Feature: Filtering todos

  

  In order to make me feel **a sense of accomplishment**

  As a forgetful person

  I want to be to _view all of things I have completed_

Starting ChromeDriver 2.31.488774 (7e15618d1bf16df8bf0ecf2914ed1964a387ba0b) on port 1271

Only local connections are allowed.

Aug 19, 2017 2:35:14 PM org.openqa.selenium.remote.ProtocolHandshake createSession

INFO: Detected dialect: OSS


  Scenario: View **only completed items** #123 in Cucumber                 # /Users/john/git/screenplay-pattern-todomvc-master/src/test/resources/features/maintain_my_todo_list/filtering_todos.feature:8

    Given that Jane has a todo list containing Buy some milk, Walk the dog # TodoUserSteps.that_James_has_an_empty_todo_list(String,String>)

      java.lang.NullPointerException

      at net.thucydides.core.steps.StepEventBus.updateOverallResults(StepEventBus.java:663)

      at net.serenitybdd.screenplay.EventBusInterface.updateOverallResult(EventBusInterface.java:29)

      at net.serenitybdd.screenplay.Actor.perform(Actor.java:111)

================

  If it is possible would you please help build your demo project for Firefox browser?  I really appreciate if you could help! but I will continue to figure it out on my part.

John Smart

unread,
Aug 19, 2017, 4:00:27 PM8/19/17
to SeleniumWhat?, Serenity BDD Users Group
I've just updated to the latest version on GitHub, but we already use the demo project as our smoke tests running on Chrome and Firefox on Windows, Mac and Linux; they should run just fine with Firefox. How are you running the tests?

SeleniumWhat?

unread,
Aug 19, 2017, 4:25:12 PM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com
  Hi John
  How am I running the tests?  that's a good question.
  I went back, set up the maven config file and ran the whole project as maven then it works... yeeeehaaaa it works ;-)
  but if I run the test as each individual Gherkin feature then it errs out.  The reason why I'm sure.  I can guess it is because there are some dependencies ?  but I don't think it is the case, isn't?
  My understanding is that each feature file must be self-contain and acts as an independent test case... then why running individual feature file is failing?
  Any way.. every good progress!  love it :-).
  Now I want to switch the browser type to Firefox.  Let me run the test with Gecko and Firefox browser.  Is there anything different that I need to set up before I can switch the config?
  Thanks a lot John.  You're my hero! :-)
  J.N

John Smart

unread,
Aug 19, 2017, 4:35:45 PM8/19/17
to SeleniumWhat?, Serenity BDD Users Group
How are you running the tests from the Gherkin files?

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.

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

SeleniumWhat?

unread,
Aug 19, 2017, 4:40:32 PM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com
Hi John,
  I changed the browser type in the "serenity.properties" to "webdriver.driver=firefox"
  But the execution still picked up the Chrome browser.  Would you tel me where/how to set it up for the FF v55.x?
  Thanks John!
  J.N


John Smart

unread,
Aug 19, 2017, 4:53:22 PM8/19/17
to SeleniumWhat?, Serenity BDD Users Group
Update the serenity.conf file instead (the demo project shows a couple of different ways of configuring Serenity).

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SeleniumWhat?

unread,
Aug 19, 2017, 4:56:14 PM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com

Hi John,
  Where can I find  the serenity.conf file?
  The instructions on how to config the browser type are on the project's README?
  Thanks
  J.N

SeleniumWhat?

unread,
Aug 19, 2017, 5:07:41 PM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com
Never mind.. found it.
Thanks
J.N

SeleniumWhat?

unread,
Aug 19, 2017, 5:22:54 PM8/19/17
to Serenity BDD Users Group, nguye...@yahoo.com
I changed the "driver = firebox" but it erred out .. arggg...
I also change the gecko option

#gecko.firefox.options={"binary": "/Applications/Firefox-49.1.app/Contents/MacOS/firefox-bin","log":{"level":"debug"}}

gecko.firefox.options={"binary": "/Applications/Firefox.app","log":{"level":"debug"}}


  The "/Applicaitons/Firefox.app" is the FF browser v55.X

  ======================

Running Scenario: Adding an item to an empty list in Cucumber

[pool-1-thread-1] INFO net.serenitybdd.core.Serenity - 

 _____ _____ ____ _____   ____ _____  _    ____ _____ _____ ____  

|_   _| ____/ ___|_   _| / ___|_   _|/ \  |  _ \_   _| ____|  _ \ 

  | | |  _| \___ \ | |   \___ \ | | / _ \ | |_) || | |  _| | | | |

  | | | |___ ___) || |    ___) || |/ ___ \|  _ < | | | |___| |_| |

  |_| |_____|____/ |_|   |____/ |_/_/   \_\_| \_\|_| |_____|____/ 

                                                                  


TEST STARTED: Adding an item to an empty list in Cucumber

-------------------------------------------------------------------(add-new-todos;adding-an-item-to-an-empty-list-in-cucumber)

[pool-1-thread-1] ERROR net.thucydides.core.webdriver.WebDriverFacade - FAILED TO CREATE NEW WEBDRIVER_DRIVER INSTANCE class org.openqa.selenium.firefox.FirefoxDriver: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (Specified firefox binary location does not exist or is not a real file: /Applications/Firefox.app

net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (Specified firefox binary location does not exist or is not a real file: /Applications/Firefox.app at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:135) at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:147) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:138) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:108) at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:183) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:178) at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:827) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:737) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:725) at net.serenitybdd.screenplay.actions.OpenPage.performAs(OpenPage.java:22) at net.serenitybdd.screenplay.actions.OpenPage$$EnhancerByCGLIB$$dba123b6.CGLIB$performAs$0(<generated>) at net.serenitybdd.screenplay.actions.OpenPage$$EnhancerByCGLIB$$dba123b6$$FastClassByCGLIB$$785f3e13.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:395) at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:380) at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:355) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:132) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61) at net.serenitybdd.screenplay.actions.OpenPage$$EnhancerByCGLIB$$dba123b6.performAs(<generated>) at net.serenitybdd.screenplay.Actor.perform(Actor.java:98) at net.serenitybdd.screenplay.Actor.attemptsTo(Actor.java:82) at net.serenitybdd.demos.todos.screenplay.tasks.Start.performAs(Start.java:27) at net.serenitybdd.demos.todos.screenplay.tasks.Start$$EnhancerByCGLIB$$d3ca1a4b.CGLIB$performAs$0(<generated>) at net.serenitybdd.demos.todos.screenplay.tasks.Start$$EnhancerByCGLIB$$d3ca1a4b$$FastClassByCGLIB$$82d0905c.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:395) at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:380) at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:355) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:132) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61) at net.serenitybdd.demos.todos.screenplay.tasks.Start$$EnhancerByCGLIB$$d3ca1a4b.performAs(<generated>) at net.serenitybdd.screenplay.Actor.perform(Actor.java:98) at net.serenitybdd.screenplay.Actor.attemptsTo(Actor.java:82) at net.serenitybdd.screenplay.Actor.wasAbleTo(Actor.java:76) at net.serenitybdd.demos.todos.cucumber.steps.TodoUserSteps.that_James_has_an_empty_todo_list(TodoUserSteps.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at cucumber.runtime.Utils$1.call(Utils.java:40) at cucumber.runtime.Timeout.timeout(Timeout.java:16) at cucumber.runtime.Utils.invoke(Utils.java:34) at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38) at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37) at cucumber.runtime.Runtime.runStep(Runtime.java:300) at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44) at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39) at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44) at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:387) at org.apache.maven.surefire.junitcore.pc.InvokerStrategy.schedule(InvokerStrategy.java:54) at org.apache.maven.surefire.junitcore.pc.Scheduler.schedule(Scheduler.java:346) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.api.junit.Cucumber.run(Cucumber.java:100) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:387) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: java.lang.IllegalStateException: Specified firefox binary location does not exist or is not a real file: /Applications/Firefox.app at com.google.common.base.Preconditions.checkState(Preconditions.java:444) at org.openqa.selenium.firefox.internal.Executable.<init>(Executable.java:46) at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:138) at org.openqa.selenium.firefox.FirefoxOptions.setBinary(FirefoxOptions.java:193) at org.openqa.selenium.firefox.FirefoxOptions.setBinary(FirefoxOptions.java:203) at org.openqa.selenium.firefox.FirefoxOptions.fromJsonMap(FirefoxOptions.java:94) at org.openqa.selenium.firefox.FirefoxDriver.getFirefoxOptions(FirefoxDriver.java:223) at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:137) at net.serenitybdd.core.webdriver.driverproviders.FirefoxDriverProvider.newFirefoxDriver(FirefoxDriverProvider.java:69) at net.serenitybdd.core.webdriver.driverproviders.FirefoxDriverProvider.newInstance(FirefoxDriverProvider.java:52) at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:125) ... 77 moreTests run: 5, Failures: 0, Errors: 2, Skipped: 2, Time elapsed: 0.004 sec <<< FAILURE! - in Scenario: Adding an item to an empty list in Cucumber

Given that James has an empty todo list(Scenario: Adding an item to an empty list in Cucumber)  Time elapsed: 0.003 sec  <<< ERROR!

net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver

at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:151)

at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:138)

at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:108)


=======================
I'll your update and see if makes any different!
          Thanks
          J.N 

John Smart

unread,
Aug 19, 2017, 5:24:53 PM8/19/17
to SeleniumWhat?, Serenity BDD Users Group
The path to Firefox should be something like /Applications/Firefox.app/Contents/MacOS/firefox-bin

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SeleniumWhat?

unread,
Aug 20, 2017, 8:50:57 AM8/20/17
to Serenity BDD Users Group, nguye...@yahoo.com
Hi John,
  I set the gecko.firefox.options to what you recommended but it still failed.

#gecko.firefox.options={"binary": "/Applications/Firefox-49.1.app/Contents/MacOS/firefox-bin","log":{"level":"debug"}}

gecko.firefox.options={"binary": "/Applications/Firefox_55.0.app/Contents/MacOS/firefox-bin","log":{"level":"debug"}}



  I found an error message on console that says: 

 "Caused by: org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC"

  It seems to look for the FF binary set in the $PATH (not from the serenity.properties file)?  I'll try to set the $PATH and see how it works.
   Thanks John!
  J.N
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.

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

SeleniumWhat?

unread,
Aug 20, 2017, 8:54:10 AM8/20/17
to Serenity BDD Users Group, nguye...@yahoo.com
Darn!!! it sill gets the same error message.....
J.N

SeleniumWhat?

unread,
Aug 20, 2017, 8:59:04 AM8/20/17
to Serenity BDD Users Group, nguye...@yahoo.com
I was able to kick off the FF from the path that I set in $PATH:

Macbook:~ john$ echo $PATH

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/john/apache-maven-3.5.0/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/bin:/Applications:/Applications/WebDrivers:/usr/local/bin:/Applications/Firefox_55.0.app/Contents/MacOS/firefox-bin

Macbook:~ john$ /Applications/Firefox_55.0.app/Contents/MacOS/firefox-bin


So selenium seems to look for the FF binary in some other place.  Where is the other place?

hmmmmm....


J.N


SeleniumWhat?

unread,
Aug 20, 2017, 9:10:38 AM8/20/17
to Serenity BDD Users Group, nguye...@yahoo.com
Hi John,
       Is it possible you could help to bring all of the drivers (Gecko, Chrome, Firefox, etc..) setting and the browser types setting up to the POM.xml level so that the user can configure/customize them?
      Just asking... I know you must have good reasons to make the setting not to be system dependent but I found it harder to configure/debug them without seeing how the drivers were initialized.
      Thanks John!
      J.N

[pool-1-thread-1] ERROR net.thucydides.core.webdriver.WebDriverFacade - FAILED TO CREATE NEW WEBDRIVER_DRIVER INSTANCE class org.openqa.selenium.firefox.FirefoxDriver: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC

Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'

System info: host: 'Macbook.home', ip: 'fe80:0:0:0:cd1:ec02:267f:bf40%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.2', java.version: '1.8.0_101'

Driver info: driver.version: FirefoxDriver

net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate new WebDriver instance of type class org.openqa.selenium.firefox.FirefoxDriver (Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC

Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'

System info: host: 'Macbook.home', ip: 'fe80:0:0:0:cd1:ec02:267f:bf40%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.2', java.version: '1.8.0_101'

Driver info: driver.version: FirefoxDriver at net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:135) at net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:147) at net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:138) at net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:108) at net.thucydides.core.webdriver.WebDriverFacade.openIgnoringHtmlUnitScriptErrors(WebDriverFacade.java:183) at net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:178) at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:827) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:737) at net.serenitybdd.core.pages.PageObject.open(PageObject.java:725) at net.serenitybdd.screenplay.actions.OpenPage.performAs(OpenPage.java:22) at net.serenitybdd.screenplay.actions.OpenPage$$EnhancerByCGLIB$$dba123b6.CGLIB$performAs$0(<generated>) at net.serenitybdd.screenplay.actions.OpenPage$$EnhancerByCGLIB$$dba123b6$$FastClassByCGLIB$$785f3e13.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:395) at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:380) at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:355) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:132) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61) at net.serenitybdd.screenplay.actions.OpenPage$$EnhancerByCGLIB$$dba123b6.performAs(<generated>) at net.serenitybdd.screenplay.Actor.perform(Actor.java:98) at net.serenitybdd.screenplay.Actor.attemptsTo(Actor.java:82) at net.serenitybdd.demos.todos.screenplay.tasks.Start.performAs(Start.java:27) at net.serenitybdd.demos.todos.screenplay.tasks.Start$$EnhancerByCGLIB$$d3ca1a4b.CGLIB$performAs$0(<generated>) at net.serenitybdd.demos.todos.screenplay.tasks.Start$$EnhancerByCGLIB$$d3ca1a4b$$FastClassByCGLIB$$82d0905c.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:395) at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:380) at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:355) at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:132) at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61) at net.serenitybdd.demos.todos.screenplay.tasks.Start$$EnhancerByCGLIB$$d3ca1a4b.performAs(<generated>) at net.serenitybdd.screenplay.Actor.perform(Actor.java:98) at net.serenitybdd.screenplay.Actor.attemptsTo(Actor.java:82) at net.serenitybdd.screenplay.Actor.wasAbleTo(Actor.java:76) at net.serenitybdd.demos.todos.cucumber.steps.TodoUserSteps.that_James_has_an_empty_todo_list(TodoUserSteps.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at cucumber.runtime.Utils$1.call(Utils.java:40) at cucumber.runtime.Timeout.timeout(Timeout.java:16) at cucumber.runtime.Utils.invoke(Utils.java:34) at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:38) at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37) at cucumber.runtime.Runtime.runStep(Runtime.java:300) at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44) at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39) at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44) at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63) at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95) at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:387) at org.apache.maven.surefire.junitcore.pc.InvokerStrategy.schedule(InvokerStrategy.java:54) at org.apache.maven.surefire.junitcore.pc.Scheduler.schedule(Scheduler.java:346) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at cucumber.api.junit.Cucumber.run(Cucumber.java:100) at org.junit.runners.Suite.runChild(Suite.java:128) at org.junit.runners.Suite.runChild(Suite.java:27) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:387) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC


John Smart

unread,
Aug 20, 2017, 9:14:17 AM8/20/17
to SeleniumWhat?, Serenity BDD Users Group
If you put this in the Pom.xml file you cause big problems for CI and for other developers, so it is a big antipattern. 

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

SeleniumWhat?

unread,
Aug 20, 2017, 9:36:02 AM8/20/17
to Serenity BDD Users Group, nguye...@yahoo.com
I see the reason now.
Thanks John!
J.N
Reply all
Reply to author
Forward
0 new messages