Serenity 3.x support

978 views
Skip to first unread message

John Smart

unread,
Jun 27, 2017, 1:58:28 AM6/27/17
to thucydid...@googlegroups.com
Hi All,

Big news: we've just published version 1.5.0-rc.1 of serenity-core and serenity-maven-plugin, which use Selenium 3.x and need Java 8. It is experimental at the stage - we haven't migrated the cucumber and jbehave modules just yet - but if you have pure JUnit projects, please try it out and let us know how it goes!

--
___________________________________________________
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.
___________________________________________________

testert...@gmail.com

unread,
Jun 30, 2017, 4:03:22 AM6/30/17
to Serenity BDD Users Group
Hi John,

Thank you for this information. My team uses Serenity quite heavily and we wait "impatiently" :) for Serenity 1.5. Do you know when potentially we could expect at least full release of 1.5.0-rc.1 with all jars ? We could do first testing just after that. 

When we switched to Selenium 3.x/Firefox/geckodriver with Serenity 1.4.0 yesterday we got many such exceptions:
net.serenitybdd.core.exceptions.SerenityManagedException: org.openqa.selenium.support.ui.Wait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;
at net.thucydides.core.steps.ErrorConvertor.convertToAssertion(ErrorConvertor.java:22)
at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:342)
at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:134)
at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61)
at com.bbh.automation.steps.DimensionsSteps$$EnhancerByCGLIB$$52d1e94d.open_application(<generated>)
at com.bbh.automation.DimensionsWellnessCheck.openApplication(DimensionsWellnessCheck.java:14)
(reflection-invoke)

Thank you for answer,
Kind regards,
foxrafi

Harry King

unread,
Jun 30, 2017, 6:16:42 PM6/30/17
to Serenity BDD Users Group
Try adding this to your POM file:

<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>21.0</version>
      </dependency>
   </dependencies>
</dependencyManagement>

Santosh Chauhan

unread,
Jul 1, 2017, 3:17:51 PM7/1/17
to Serenity BDD Users Group
Hi John,

I have upgraded selenium to 3.4.0 and tried with serenity version 1.5.0-rc.1 but getting below issue for all browsers. However able to run test in chrome with selenium 2.53.1.
I also tried by upgrading guava 21.0 but no luck.

net.serenitybdd.core.exceptions.SerenityManagedException: org.openqa.selenium.support.ui.Wait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;

at net.serenitybdd.core.pages.WebElementFacadeImpl.waitUntilEnabled(WebElementFacadeImpl.java:879)
at net.serenitybdd.core.pages.WebElementFacadeImpl.waitUntilElementAvailable(WebElementFacadeImpl.java:715)
at net.serenitybdd.core.pages.WebElementFacadeImpl.click(WebElementFacadeImpl.java:954)
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 net.thucydides.core.annotations.locators.AbstractSingleItemHandler.invoke(AbstractSingleItemHandler.java:45)
at com.sun.proxy.$Proxy25.click(Unknown Source)
at KrtavyaPage.clickSignIn(KrtavyaPage.java:19)
at TestSteplibs.openUrl(TestSteplibs.java:28)
at TestSteplibs$$EnhancerByCGLIB$$220ea445.CGLIB$openUrl$0(<generated>)
at TestSteplibs$$EnhancerByCGLIB$$220ea445$$FastClassByCGLIB$$5c0bbbc3.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at net.thucydides.core.steps.StepInterceptor.invokeMethod(StepInterceptor.java:372)
at net.thucydides.core.steps.StepInterceptor.executeTestStepMethod(StepInterceptor.java:357)
at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:332)
at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:134)
at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61)
at TestSteplibs$$EnhancerByCGLIB$$220ea445.openUrl(<generated>)
at TestSteps.user_logged_in_successfully(TestSteps.java:26)
at ✽.Then User logged in successfully(./src/test/resources/Krtavya.feature:5)


Best Regards,
Santosh Chauhan

testert...@gmail.com

unread,
Jul 3, 2017, 5:37:52 AM7/3/17
to Serenity BDD Users Group
Hi, 

Thank you Harry and John. I saw that serenity-core was also published to Maven Central repository, unfortunately I still have the same error as earlier but this, probably, due to serenity-jbehave.

BTW. Is there any plan when serenity-jbehave (supporting Selenium 3.x) is available for testing ?

Thank you,

testert...@gmail.com

unread,
Jul 19, 2017, 9:29:02 AM7/19/17
to Serenity BDD Users Group
Hi,

Could you also deploy new rc for 1.5 to maven https://mvnrepository.com ?

Thank you,

On Tuesday, June 27, 2017 at 7:58:28 AM UTC+2, John Smart wrote:

John Smart

unread,
Jul 19, 2017, 9:31:50 AM7/19/17
to testert...@gmail.com, Serenity BDD Users Group
Hi,

https://mvnrepository.com is just an indexed version of Maven Central; it is often slow to update and out of date. It is not a true reflection of what your maven project will download. If you want to know what is on Maven Central, use http://search.maven.org (see for example http://search.maven.org/#search%7Cga%7C1%7Cserenity-core).

--
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.

Ilya

unread,
Aug 14, 2017, 8:25:04 AM8/14/17
to Serenity BDD Users Group
Hi John,

Is there any plans to migrate serenity to selenium webdriver v3.5.0 ?
It seems like selenium community changed a lot of stuff there, and some drivers (eg. iexplorer) require this update - https://raw.githubusercontent.com/SeleniumHQ/selenium/master/cpp/iedriverserver/CHANGELOG

Thank you for answer !

John Smart

unread,
Aug 14, 2017, 8:42:12 AM8/14/17
to Ilya, Serenity BDD Users Group
Hi Ilya,

The latest version of Selenium (3.4.0) is supported by Serenity 1.5.x.



--
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.

Ilya

unread,
Aug 14, 2017, 8:58:22 AM8/14/17
to Serenity BDD Users Group, ily...@gmail.com
Yes, I've already switched to serenity 1.5.4, thanks a lot for this upgrade !

But when I tried to use the latest iedriver (3.5) - test didn't work. 
In the release notes, I found:
To successfully use this version of the IE driver, you should be using
   version 3.5 or above of the language bindings
 
So we need to use a selenium v3.5.0, which is already available on the official site - http://www.seleniumhq.org/download/


On Monday, August 14, 2017 at 3:42:12 PM UTC+3, John Smart wrote:
Hi Ilya,

The latest version of Selenium (3.4.0) is supported by Serenity 1.5.x.


On 14 August 2017 at 13:25, Ilya <ily...@gmail.com> wrote:
Hi John,

Is there any plans to migrate serenity to selenium webdriver v3.5.0 ?
It seems like selenium community changed a lot of stuff there, and some drivers (eg. iexplorer) require this update - https://raw.githubusercontent.com/SeleniumHQ/selenium/master/cpp/iedriverserver/CHANGELOG

Thank you for answer !

On Tuesday, June 27, 2017 at 8:58:28 AM UTC+3, John Smart wrote:
Hi All,

Big news: we've just published version 1.5.0-rc.1 of serenity-core and serenity-maven-plugin, which use Selenium 3.x and need Java 8. It is experimental at the stage - we haven't migrated the cucumber and jbehave modules just yet - but if you have pure JUnit projects, please try it out and let us know how it goes!

--
___________________________________________________
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.
___________________________________________________

--
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.

John Smart

unread,
Aug 14, 2017, 9:00:46 AM8/14/17
to Ilya, Serenity BDD Users Group
Looks like 3.5.0 is not on Central yet, so not ready for prime time. There will be an update when it becomes generally available.

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.

Baskar chinnakonda

unread,
Aug 16, 2017, 6:28:48 AM8/16/17
to Serenity BDD Users Group
John, very nice to hear this news from your side 

Have a Quick Question:
  1. Could you please let us know when are planning to migrate serenity 1.5.x with cucumber? 
  2. In the mean time, if you have any alternate way to test with latest firefox/edge browser using serenity cucumber. please do let us know.
Thank you in advance!

CSB

John Smart

unread,
Aug 16, 2017, 6:29:50 AM8/16/17
to Baskar chinnakonda, Serenity BDD Users Group
The latest versions of serenity-cucumber and serenity-behave work with serenity 1.5.x

--
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.

Baskar chinnakonda

unread,
Aug 17, 2017, 3:50:10 AM8/17/17
to Serenity BDD Users Group, baskarch...@gmail.com
John

I have noticed the below issue after i upgraded to 1.5.4 version. 

Aug 17, 2017 7:13:54 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS 

Used the below POM Configuration for my test: But the same scenario works with Serenity 1.1.34 without any issues

<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>

        <groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>

Observation:

1. whenever i execute my test with the above configuration, it launches the chrome browser and it executes GWT code (fine)

2. Once the GWT execution is completed then the browser terminates and it fails to execute @After  (Cucumber),Since the browser is closed it is looking for element mentioned in @After.

Received the below error:

Aug 17, 2017 7:13:54 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS



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.

John Smart

unread,
Aug 17, 2017, 4:15:46 AM8/17/17
to Baskar chinnakonda, Serenity BDD Users Group
Is there a stack dump in the logs?

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.
Message has been deleted

Baskar chinnakonda

unread,
Aug 17, 2017, 9:12:27 AM8/17/17
to Serenity BDD Users Group, baskarch...@gmail.com
Here is the stack trace:

Setting runtime options in createRuntime()

[main] INFO net.serenitybdd.core.Serenity -

 

-------------------------------------------------------------------------------------

     _______. _______ .______       _______ .__   __.  __  .___________.____    ____

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

   |   (----`|  |__   |  |_)  |    |  |__   |   \|  | |  | `---|  |----` \   \/   /  

    \   \    |   __|  |      /     |   __|  |  . `  | |  |     |  |       \_    _/  

.----)   |   |  |____ |  |\  \----.|  |____ |  |\   | |  |     |  |         |  |    

|_______/    |_______|| _| `._____||_______||__| \__| |__|     |__|         |__|    

-------------------------------------------------------------------------------------

 

[main] INFO net.serenitybdd.core.Serenity - Test Suite Started: CB Login

[main] INFO net.serenitybdd.core.Serenity -

 _____ _____ ____ _____   ____ _____  _    ____ _____ _____ ____ 

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

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

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

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

                                                                 

 

TEST STARTED: Login to CB with Ambulatory User credentials

-------------------------------------------------------------------(cb-login;login-to-cb-with-ambulatory-user-credentials)

Starting ChromeDriver 2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8) on port 26572

Only local connections are allowed.

Aug 17, 2017 1:03:16 PM org.openqa.selenium.remote.ProtocolHandshake createSession

INFO: Detected dialect: OSS

[INFO] Successfully logged in

[main] INFO net.serenitybdd.core.Serenity -

        __    _____ _____ ____ _____   ____   _    ____  ____  _____ ____ 

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

 (_)_____| |   | | |  _| \___ \ | |   | |_) / _ \ \___ \\___ \|  _| | | | |

  _|_____| |   | | | |___ ___) || |   |  __/ ___ \ ___) |___) | |___| |_| |

 (_)     | |   |_| |_____|____/ |_|   |_| /_/   \_\____/|____/|_____|____/

        /_/                                                                

 

TEST PASSED: Login to CB with Ambulatory User credentials

----------------------------------------------------------------------------

Aug 17, 2017 1:04:23 PM org.openqa.selenium.remote.ProtocolHandshake createSession

INFO: Detected dialect: OSS

[pool-1-thread-1] INFO net.thucydides.core.reports.json.JSONTestOutcomeReporter - Generating JSON report for Login to CB with Ambulatory User credentials to file C:\Users\Administrator\Perforce\ \HLP\DEV\6.2\main\BDD\cbserenitybdd\target\site\serenity\6f19d3b1b670737027db6eabbe8097c1e4e2c2341e1c5f9b4c03aa6409718669.json (using temp file C:\Users\Administrator\Perforce\ \HLP\DEV\6.2\main\BDD\cbserenitybdd\target\site\serenity\6f19d3b1b670737027db6eabbe8097c1e4e2c2341e1c5f9b4c03aa6409718669.json2f009569-9f77-49f8-9744-b74ff258e355)

[pool-2-thread-1] INFO net.thucydides.core.reports.html.HtmlAcceptanceTestReporter - GENERATING HTML REPORT FOR CB Login:Login to CB with Ambulatory User credentials in 6f19d3b1b670737027db6eabbe8097c1e4e2c2341e1c5f9b4c03aa6409718669.html in directory target\site\serenity 

 

_[31mFailed scenarios:_[0m

_[31mlogin/login.feature:10 _[0m# Scenario: Login to CB with Ambulatory User credentials

 

1 Scenarios (_[31m1 failed_[0m)

3 Steps (_[32m3 passed_[0m)

2m46.792s

 

net.serenitybdd.core.exceptions.SerenityManagedException: The following error occurred: Timed out after 5 seconds. Element not found

For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html

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

System info: host: 'xxxxxx8', ip: '3.x.x.x, os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_91'

Driver info: driver.version: unknown

      at net.serenitybdd.core.exceptions.SerenityManagedException.detachedCopyOf(SerenityManagedException.java:21)

      at net.thucydides.core.steps.StepInterceptor.runTestStep(StepInterceptor.java:364)

      at net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:132)

      at net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:61)

      at com.gehc.cb.bdd.helpers.LoginHelper$$EnhancerByCGLIB$$c006c5ed.logOutFromCb(<generated>)

      at com.gehc.cb.bdd.steps.LoginSteps.iclickedOnLogout(LoginSteps.java:167)

      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.JavaHookDefinition.execute(JavaHookDefinition.java:60)

      at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)

      at cucumber.runtime.Runtime.runHooks(Runtime.java:212)

      at cucumber.runtime.Runtime.runAfterHooks(Runtime.java:206)

      at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:46)

      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.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.api.junit.Cucumber.run(Cucumber.java:100)

      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)

      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

John Smart

unread,
Aug 17, 2017, 9:36:35 AM8/17/17
to Baskar chinnakonda, Serenity BDD Users Group
Have a look in the reports to see which element it was looking for ("Timed out after 5 seconds. Element not found"). It doesn't appear to be a Serenity issue.

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.

Baskar chinnakonda

unread,
Aug 17, 2017, 9:48:56 AM8/17/17
to Serenity BDD Users Group, baskarch...@gmail.com
John,

What i observed is : 

The scenario work and it executed Given/When/Then Steps successfully but my logout part is in @After. 

What happen here is after executing Given/When/Then - the browser closed. and my test is looking for logout method (the logout method is in @After step) 

Scenario: Login to CB with Ambulatory User credentials 
Given I am on the CB Login page 
When I login as an Ambulatory user 
Then I verify the user is displayed in banner

John Smart

unread,
Aug 17, 2017, 10:02:22 AM8/17/17
to Baskar chinnakonda, Serenity BDD Users Group
Unfortunately the @After methods will be called after the test has completed. Because of the way Cucumber works, the code that closes the browser gets called automatically before Cucumber calls any of the @After methods, and there isn't much we can do about it (it's the way Cucumber works). 

But since Selenium uses a fresh session for each browser, I would think that you would get logged out automatically.

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.

Baskar chinnakonda

unread,
Aug 17, 2017, 12:10:22 PM8/17/17
to Serenity BDD Users Group, baskarch...@gmail.com
I am just thinking how the same scenario it works in 1.1.34 Serenity Version. i don't see any issues. But fails in 1.5.4

Baskar chinnakonda

unread,
Aug 17, 2017, 10:04:43 PM8/17/17
to Serenity BDD Users Group, baskarch...@gmail.com
Thank you john,

Could you please let me know if there any alternative ways to handle this?

John Smart

unread,
Aug 18, 2017, 3:37:13 AM8/18/17
to Baskar chinnakonda, Serenity BDD Users Group
Have you tried the following setting? 

serenity.restart.browser.for.each=feature

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.

Baskar chinnakonda

unread,
Aug 18, 2017, 4:50:36 AM8/18/17
to Serenity BDD Users Group, baskarch...@gmail.com
Thanks a lot for your help john 

Added serenity.restart.browser.for.each=feature in property file

Here are my observation:

Tested with single scenario - it works fine and the test properly logout from the application  passed successfully - Good
==============================================================================================

Test with multiple scenario's in one tag. let say @smoke (contains 5 scenario's) - it fails and see the stack track given below

Setting runtime options in createRuntime()
[main] INFO net.serenitybdd.core.Serenity - 

-------------------------------------------------------------------------------------
     _______. _______ .______       _______ .__   __.  __  .___________.____    ____ 
    /       ||   ____||   _  \     |   ____||  \ |  | |  | |           |\   \  /   / 
   |   (----`|  |__   |  |_)  |    |  |__   |   \|  | |  | `---|  |----` \   \/   /  
    \   \    |   __|  |      /     |   __|  |  . `  | |  |     |  |       \_    _/   
.----)   |   |  |____ |  |\  \----.|  |____ |  |\   | |  |     |  |         |  |     
|_______/    |_______|| _| `._____||_______||__| \__| |__|     |__|         |__|    
-------------------------------------------------------------------------------------

[main] INFO net.serenitybdd.core.Serenity - Test Suite Started: CB Login
[main] INFO net.serenitybdd.core.Serenity - 
 _____ _____ ____ _____   ____ _____  _    ____ _____ _____ ____  
|_   _| ____/ ___|_   _| / ___|_   _|/ \  |  _ \_   _| ____|  _ \ 
  | | |  _| \___ \ | |   \___ \ | | / _ \ | |_) || | |  _| | | | |
  | | | |___ ___) || |    ___) || |/ ___ \|  _ < | | | |___| |_| |
  |_| |_____|____/ |_|   |____/ |_/_/   \_\_| \_\|_| |_____|____/ 
                                                                  

TEST STARTED: Login to CB with Ambulatory User credentials
-------------------------------------------------------------------(cb-login;login-to-cb-with-ambulatory-user-credentials)
Starting ChromeDriver 2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8) on port 20224
Only local connections are allowed.
Aug 18, 2017 8:39:04 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
[INFO] Successfully logged in
[main] INFO net.serenitybdd.core.Serenity - 
        __    _____ _____ ____ _____   ____   _    ____  ____  _____ ____  
  _     \ \  |_   _| ____/ ___|_   _| |  _ \ / \  / ___|/ ___|| ____|  _ \ 
 (_)_____| |   | | |  _| \___ \ | |   | |_) / _ \ \___ \\___ \|  _| | | | |
  _|_____| |   | | | |___ ___) || |   |  __/ ___ \ ___) |___) | |___| |_| |
 (_)     | |   |_| |_____|____/ |_|   |_| /_/   \_\____/|____/|_____|____/ 
        /_/                                                                

TEST PASSED: Login to CB with Ambulatory User credentials
----------------------------------------------------------------------------
[INFO] Logged out successfully
[pool-1-thread-1] INFO net.thucydides.core.reports.json.JSONTestOutcomeReporter - Generating JSON report for Login to CB with Ambulatory User credentials to file C:\Users\Administrator\Perforce\Baskar.CSB_usmkeehlpta58_CB62\HLP\DEV\6.2\main\BDD\cbserenitybdd\target\site\serenity\6f19d3b1b670737027db6eabbe8097c1e4e2c2341e1c5f9b4c03aa6409718669.json (using temp file C:\Users\Administrator\Perforce\Baskar.CSB_usmkeehlpta58_CB62\HLP\DEV\6.2\main\BDD\cbserenitybdd\target\site\serenity\6f19d3b1b670737027db6eabbe8097c1e4e2c2341e1c5f9b4c03aa6409718669.json094a6ff6-0580-48c6-aca8-d958ad2baa3b)
[pool-2-thread-1] INFO net.thucydides.core.reports.html.HtmlAcceptanceTestReporter - GENERATING HTML REPORT FOR CB Login:Login to CB with Ambulatory User credentials in 6f19d3b1b670737027db6eabbe8097c1e4e2c2341e1c5f9b4c03aa6409718669.html in directory target\site\serenity  
[main] INFO net.serenitybdd.core.Serenity - 
 _____ _____ ____ _____   ____ _____  _    ____ _____ _____ ____  
|_   _| ____/ ___|_   _| / ___|_   _|/ \  |  _ \_   _| ____|  _ \ 
  | | |  _| \___ \ | |   \___ \ | | / _ \ | |_) || | |  _| | | | |
  | | | |___ ___) || |    ___) || |/ ___ \|  _ < | | | |___| |_| |
  |_| |_____|____/ |_|   |____/ |_/_/   \_\_| \_\|_| |_____|____/ 
                                                                  

TEST STARTED: Login to CB with Hospital User credentials
-------------------------------------------------------------------(cb-login;login-to-cb-with-hospital-user-credentials)
[main] WARN net.thucydides.core.pages.Pages - Failed to instantiate page of type class com.gehc.cb.bdd.pages.common.page.LoginPage ({})
org.openqa.selenium.WebDriverException: unknown error: failed to change window state to normal, current state is maximized
  (Session info: chrome=60.0.3112.90)
  (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 254 milliseconds
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'USMKEEHLPTA58', ip: '3.20.224.171', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8), userDataDir=C:\Users\ADMINI~1\AppData\Local\Temp\scoped_dir6608_15551}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=60.0.3112.90, platform=WIN8_1, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]
Session ID: 9705077147868356f68d85d837e069a0
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:694)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:925)
at com.gehc.cb.bdd.pages.common.page.LoginPage.<init>(LoginPage.java:110)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at net.thucydides.core.pages.Pages.createFromConstructorWithWebdriver(Pages.java:246)
at net.thucydides.core.pages.Pages.getCurrentPageOfType(Pages.java:204)
at net.thucydides.core.pages.Pages.getPage(Pages.java:88)
at net.thucydides.core.steps.PageObjectDependencyInjector.instantiatePageObjectIfNotAssigned(PageObjectDependencyInjector.java:55)
at net.thucydides.core.steps.PageObjectDependencyInjector.injectDependenciesInto(PageObjectDependencyInjector.java:33)
at net.thucydides.core.steps.StepFactory.injectOtherDependenciesInto(StepFactory.java:141)
at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:131)
at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:117)
at net.thucydides.core.steps.StepFactory.getNewStepLibraryFor(StepFactory.java:82)
at net.thucydides.core.steps.StepFactory.getStepLibraryFor(StepFactory.java:76)
at net.thucydides.core.steps.StepAnnotations.instantiateAnyUnitiaializedSteps(StepAnnotations.java:52)
at net.thucydides.core.steps.StepAnnotations.instanciateScenarioStepFields(StepAnnotations.java:41)
at net.thucydides.core.steps.StepAnnotations.injectScenarioStepsInto(StepAnnotations.java:23)
at net.serenitybdd.core.Serenity.injectScenarioStepsInto(Serenity.java:138)
at net.serenitybdd.core.Serenity.initializeWithNoStepListener(Serenity.java:104)
at cucumber.runtime.SerenityObjectFactory.newInstance(SerenityObjectFactory.java:68)
at cucumber.runtime.SerenityObjectFactory.cacheNewInstance(SerenityObjectFactory.java:51)
at cucumber.runtime.SerenityObjectFactory.getInstance(SerenityObjectFactory.java:41)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
at cucumber.runtime.Runtime.runHooks(Runtime.java:212)
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:202)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)
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:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
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:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
[main] INFO net.serenitybdd.core.Serenity - 
            __  _____ _____ ____ _____   ____  _  _____ ____  ____  _____ ____  
  _        / / |_   _| ____/ ___|_   _| / ___|| |/ /_ _|  _ \|  _ \| ____|  _ \ 
 (_)_____ / /    | | |  _| \___ \ | |   \___ \| ' / | || |_) | |_) |  _| | | | |
  _|_____/ /     | | | |___ ___) || |    ___) | . \ | ||  __/|  __/| |___| |_| |
 (_)    /_/      |_| |_____|____/ |_|   |____/|_|\_\___|_|   |_|   |_____|____/ 
                                                                                

TEST SKIPPED: Login to CB with Hospital User credentials
---------------------------------------------------------------------------------
[pool-3-thread-2] INFO net.thucydides.core.reports.json.JSONTestOutcomeReporter - Generating JSON report for Login to CB with Hospital User credentials to file C:\Users\Administrator\Perforce\Baskar.CSB_usmkeehlpta58_CB62\HLP\DEV\6.2\main\BDD\cbserenitybdd\target\site\serenity\ae5105e50168ec54b4a4a6aec9413dc7b1feff731f60f7b6f8481ba0cef64459.json (using temp file C:\Users\Administrator\Perforce\Baskar.CSB_usmkeehlpta58_CB62\HLP\DEV\6.2\main\BDD\cbserenitybdd\target\site\serenity\ae5105e50168ec54b4a4a6aec9413dc7b1feff731f60f7b6f8481ba0cef64459.json8ce995f9-7121-43d3-baba-bf6513f8b424)
[pool-3-thread-1] INFO net.thucydides.core.reports.json.JSONTestOutcomeReporter - Generating JSON report for Login to CB with Ambulatory User credentials to file C:\Users\Administrator\Perforce\Baskar.CSB_usmkeehlpta58_CB62\HLP\DEV\6.2\main\BDD\cbserenitybdd\target\site\serenity\6f19d3b1b670737027db6eabbe8097c1e4e2c2341e1c5f9b4c03aa6409718669.json (using temp file C:\Users\Administrator\Perforce\Baskar.CSB_usmkeehlpta58_CB62\HLP\DEV\6.2\main\BDD\cbserenitybdd\target\site\serenity\6f19d3b1b670737027db6eabbe8097c1e4e2c2341e1c5f9b4c03aa6409718669.jsond7932f7a-fe62-47b6-92a9-c5109a5a1c90)
[pool-4-thread-2] INFO net.thucydides.core.reports.html.HtmlAcceptanceTestReporter - GENERATING HTML REPORT FOR CB Login:Login to CB with Hospital User credentials in ae5105e50168ec54b4a4a6aec9413dc7b1feff731f60f7b6f8481ba0cef64459.html in directory target\site\serenity  
[pool-4-thread-1] INFO net.thucydides.core.reports.html.HtmlAcceptanceTestReporter - GENERATING HTML REPORT FOR CB Login:Login to CB with Ambulatory User credentials in 6f19d3b1b670737027db6eabbe8097c1e4e2c2341e1c5f9b4c03aa6409718669.html in directory target\site\serenity  

[31mFailed scenarios: [0m
[31mlogin/login.feature:20 [0m# Scenario: Login to CB with Hospital User credentials

2 Scenarios ( [31m1 failed [0m, [32m1 passed [0m)
6 Steps ( [36m3 skipped [0m, [32m3 passed [0m)
0m52.487s

net.thucydides.core.pages.WrongPageError: The page object class com.gehc.cb.bdd.pages.common.page.LoginPage looks dodgy:
Failed to instantiate page (org.openqa.selenium.WebDriverException: unknown error: failed to change window state to normal, current state is maximized
  (Session info: chrome=60.0.3112.90)
  (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 6.3.9600 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 254 milliseconds
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'USMKEEHLPTA58', ip: '3.20.224.171', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8), userDataDir=C:\Users\ADMINI~1\AppData\Local\Temp\scoped_dir6608_15551}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=60.0.3112.90, platform=WIN8_1, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=}]
Session ID: 9705077147868356f68d85d837e069a0)
at net.thucydides.core.pages.Pages.thisPageObjectLooksDodgy(Pages.java:273)
at net.thucydides.core.pages.Pages.getCurrentPageOfType(Pages.java:217)
at net.thucydides.core.pages.Pages.getPage(Pages.java:88)
at net.thucydides.core.steps.PageObjectDependencyInjector.instantiatePageObjectIfNotAssigned(PageObjectDependencyInjector.java:55)
at net.thucydides.core.steps.PageObjectDependencyInjector.injectDependenciesInto(PageObjectDependencyInjector.java:33)
at net.thucydides.core.steps.StepFactory.injectOtherDependenciesInto(StepFactory.java:141)
at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:131)
at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:117)
at net.thucydides.core.steps.StepFactory.getNewStepLibraryFor(StepFactory.java:82)
at net.thucydides.core.steps.StepFactory.getStepLibraryFor(StepFactory.java:76)
at net.thucydides.core.steps.StepAnnotations.instantiateAnyUnitiaializedSteps(StepAnnotations.java:52)
at net.thucydides.core.steps.StepAnnotations.instanciateScenarioStepFields(StepAnnotations.java:41)
at net.thucydides.core.steps.StepAnnotations.injectScenarioStepsInto(StepAnnotations.java:23)
at net.serenitybdd.core.Serenity.injectScenarioStepsInto(Serenity.java:138)
at net.serenitybdd.core.Serenity.initializeWithNoStepListener(Serenity.java:104)
at cucumber.runtime.SerenityObjectFactory.newInstance(SerenityObjectFactory.java:68)
at cucumber.runtime.SerenityObjectFactory.cacheNewInstance(SerenityObjectFactory.java:51)
at cucumber.runtime.SerenityObjectFactory.getInstance(SerenityObjectFactory.java:41)
at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:224)
at cucumber.runtime.Runtime.runHooks(Runtime.java:212)
at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:202)
at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)
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:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
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:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)


Baskar chinnakonda

unread,
Aug 18, 2017, 5:17:04 AM8/18/17
to Serenity BDD Users Group, baskarch...@gmail.com
John Finally it works .. i have added getDriver().quit(); after logout.

Test with multiple scenario's in one tag. let say @smoke (contains 5 scenario's)  - passed successfully

Thanks
CSB
Thank you john,

<span style="font-size

Ibrahim

unread,
Sep 1, 2017, 3:39:28 AM9/1/17
to Serenity BDD Users Group
Hi santosh, i'm facing the same issue after upgrading selenium to 3.4.0 , did u resolve it ? 

Santosh Chauhan

unread,
Sep 5, 2017, 2:18:00 AM9/5/17
to Serenity BDD Users Group
Hi Ibrahim,

Issue was resolved by upgrading the cucumber version along with serenity version as suggested by John.

Thanks.

Prasad Nutalapati

unread,
Nov 20, 2020, 4:29:17 PM11/20/20
to Serenity BDD Users Group
Hello Folks;
I am just starting a new project based on the latest Selenium and java 1.8 and latest SerenityCucumberBDD on MacBook Pro. Do we have a github location where I can download/clone the new latest Serenity-jvm starting project template like after cloning it in to my IDE, I can start coding straight away with out bothering for writing a pom file, building folder structure etc.,
More over is the user manual still at the location:  http://thucydides.info/docs/serenity-staging              ????
Thanks a lot

--Prasad Nutalapati

Phil Scadden

unread,
Nov 22, 2020, 4:04:31 PM11/22/20
to Prasad Nutalapati, Serenity BDD Users Group
https://github.com/serenity-bdd/serenity-cucumber-starter

I would strongly recommend joining the https://gitter.im/serenity-bdd/serenity-core chat for getting community support.

--
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.
Reply all
Reply to author
Forward
0 new messages