Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 00:04

    jan-molak on webdriverio

    fix(webdriverio): complain when… test(webdriverio): webdriverio/… (compare)

  • Apr 19 22:23

    jan-molak on webdriverio

    fix(webdriverio): support for M… (compare)

  • Apr 18 00:39
    jan-molak edited #805
  • Apr 18 00:38

    jan-molak on webdriverio

    fix(webdriverio): implemented W… refactor(core): removed unused … (compare)

  • Apr 16 22:36

    jan-molak on webdriverio

    chore(webdriverio): run webdriv… (compare)

  • Apr 16 22:11

    jan-molak on webdriverio

    feat(webdriverio): initial draf… Merge branch 'master' into feat… fix(webdriverio): webdriverIONo… (compare)

  • Apr 16 05:47
    renovate[bot] commented #810
  • Apr 16 05:47
    renovate[bot] opened #810
  • Apr 16 05:47

    renovate[bot] on chromedriver-90.x

    chore(deps): update dependency … (compare)

  • Apr 15 18:58
    renovate[bot] edited #809
  • Apr 15 18:58
    renovate[bot] edited #809
  • Apr 15 18:58
    renovate[bot] synchronize #809
  • Apr 15 18:58

    renovate[bot] on node-14.x

    chore(deps): update dependency … (compare)

  • Apr 15 15:11
    renovate[bot] opened #809
  • Apr 15 15:11

    renovate[bot] on node-14.x

    chore(deps): update dependency … (compare)

  • Apr 15 09:59
    viper3400 commented #802
  • Apr 15 09:27
    jan-molak labeled #807
  • Apr 15 09:27
    jan-molak labeled #807
  • Apr 15 01:37
    jan-molak edited #805
  • Apr 15 01:37
    jan-molak edited #805
Jan Molak
@jan-molak
That depends what you mean by "size"? The length of a string? The size of a web element?
Thimmaraju G
@thimmaraju418_twitter
length of string
Jan Molak
@jan-molak
got it, you're looking for property
Ensure.that("red", property('length', isGreaterThan(2)))
property changes the context of the assertion to any property of the object being investigated
you could use that to assert on properties of an object too:
Ensure.that({ name: 'Jan' }, property('name', startsWith('J')))
Thimmaraju G
@thimmaraju418_twitter
Thank you Jan
Can any one tell me how implement MouseMove and Mousedown or any other actions in serenity js Scripts
Like browser.actions()
.mouseMove(card, {x: 100, y: 100})
.mouseDown()
.mouseMove({x: 0, y: -400})
.perform();
Jan Molak
@jan-molak
Sure, for custom things like that you'll need to write a custom interaction
It's very easy
const MyInteraction = () =>
    Interaction.where(`#actor does something`, actor =>
        BrowseTheWeb.as(actor).actions().mouseMove(card, {x: 100, y: 100}).mouseDown().mouseMove({x: 0, y: -400}).perform()
    )
Thimmaraju G
@thimmaraju418_twitter
Hi Jan ..how to upload file . Im getting invalid argument error
eyesopen
@eyesopen

Hi, can you help me to make a post request having basic auth and a post body using rest package? I did

PostRequest.to(url).with(body)

but i had to add the username and password to url and that outputs it to report, which is not desired.

5 replies
Nywlem
@Nywlem
Hello All, has anyone tried executing the tests on the IE11
8 replies
Andreas Worm
@globalworming

Hey all

I am currently rebuilding the serenity html report to a more "modern" single page application. I would appreciate your feedback on the demo https://lemon-desert-049177e03.azurestaticapps.net/

3 replies
Jan Molak
@jan-molak

Hey folks, 2.18.0 is out!

Actors can be used in beforeAll/afterAll-style hooks of your favourite test framework.
This means that you can, for example, have an actor that spins up a server that keeps running throughout the entire test suite execution.

You can also share notes between actors instantiated in beforeAll, before and within a test method using the ability to TakeNotes.usingASharedNotepad

Also, any Discardable abilities that an actor has been given will be discarded:

  • after test scenario, if the actor was instantiated in beforeEach-style hook or within a scenario
  • after test run is finished, if the actor was instantiated in beforeAll-style hook

This release also removes several deprecated APIs:

Jan Molak
@jan-molak
And here's a little example of how the new features can be used in practice:
describe('Serenity/JS 2.18.0', () => {
    before(() =>
        actorCalled('Alice')
            .whoCan(
                ManageALocalServer.runningAHttpListener(app),
                TakeNotes.usingASharedNotepad(),
            )
            .attemptsTo(
                StartLocalServer.onRandomPort(),
                TakeNote.of(LocalServer.url())
            ));

    beforeEach(() =>
        actorCalled('Bob')
            .whoCan(
                BrowseTheWeb.using(protractor.browser),
                TakeNotes.usingASharedNotepad(),
            ));

    it(`lets actors perform in “before all” hooks and share notes across test scenarios`, () =>
        actorCalled('Bob').attemptsTo(
            Navigate.to(Note.of(LocalServer.url()))
            // ...
        ));
});
As always, feedback welcome :-)
Thimmaraju G
@thimmaraju418_twitter
Hi Jan
elem.getCssValue("background-color")
How can achieve above statement in serenity js
2 replies
rakeshnambiar
@rakeshnambiar
Hello, before migrating to V2 I just tried the template project https://github.com/serenity-js/serenity-js-cucumber-protractor-template but unfortunately, the json report is not generated. I am on Win10 OS and using the Node v13.14.0 & JAVA 11.0.9
I can see the target set correctly on the protractor config ArtifactArchiver.storingArtifactsAt('./target/site/serenity')
Jan Molak
@jan-molak
Have you made any changes to the project?
rakeshnambiar
@rakeshnambiar
It's a Cucumber runner
no
Jan Molak
@jan-molak
Ok, I'd also suggest using a long term support version of node, latest one is 14
Version 13 (as well as any other odd version) is experimental, so I wouldn't recommend it for production
rakeshnambiar
@rakeshnambiar
I used the latest version before then downgraded to 13 to make-sure the node latest version is not creating the issue
:)
Jan Molak
@jan-molak
☺️
rakeshnambiar
@rakeshnambiar
switch back to node v14.2.0 and npm 6.14.4 but same result
WARNING: An illegal reflective access operation has occurred - Is this common ?
Jan Molak
@jan-molak
I can reproduce the issue on Win 10, let me have a look at what's going on
rakeshnambiar
@rakeshnambiar
thanks a lot @jan-molak
Jan Molak
@jan-molak
Could you clone the latest version and re-test, please?
(looks like dependabot has updated package.json but not package-lock.json in the template project, so serenity-bdd reporter was pulling in an older version of core)
rakeshnambiar
@rakeshnambiar
sure, thanks for solving it. I will try and let you know
image.png
It looks perfect now
Jan Molak
@jan-molak
let me know how it goes with migrating to S/JS 2 - we have an upgrade guide at https://serenity-js.org/handbook/integration/upgrading-to-serenity-js-2.html
rakeshnambiar
@rakeshnambiar
Hi @jan-molak into the template project I just copy pasted the javascript - pageobject model based legacy script and ended up with the error Error: Error: Cannot find module 'unicode-13.0.0/Binary_Property/ID_Start/code-points.js' - Is this somehow connected to the serenityJS framework?
30 replies
Jan Molak
@jan-molak

Hey folks! Serenity/JS 2.19 adds two new interfaces to Abilities: Initialisable and Discardable.

Any custom Abilities you create that implement those interfaces will be initialised by Serenity/JS before the actor starts to perform their activities, and discarded when the scenario finishes (if the actor was instantiated in scenario scope), or when the entire test run finishes (if the actor was initialised in beforeAll-style hook).

Here's an example of using those new features to make a Serenity/JS test interact with a PostgreSQL DB - https://serenity-js.org/modules/core/class/src/screenplay/Ability.ts~Ability.html

Take this new version for a spin and let me know what you think :-) I can't wait to see what you integrate your tests with!

Eric Tavela
@etavela

Hi folks - new supporter here migrating over from the Java world of Serenity BDD. Very thankful this project exists - I've just started incorporating it as my REST integration test step in a Kubernetes microservice build pipeline.

I wanted to ask what do you find is the best approach to pass in the base URL for REST tests in this kind of scenario where the URL is not known ahead of time? For now I'm going to extract it from an environment variable and default to localhost:8080 but wondered if there was more sophisticated handling for REST defaults, etc. Thanks!

Jan Molak
@jan-molak
Hi @etavela, welcome!
Is this a REST-only scenario? Or are you interacting with some UI too?
Eric Tavela
@etavela
Thanks! Yeah, REST only in this case. I'll be setting up web-based functional tests down the road, but this scenario is per-service and REST only.
Jan Molak
@jan-molak
Cool! Make sure to check out the REST testing example in the main repo.
Regarding your question, there are several ways to configure the CallAnApi ability.
13 replies
Andreas Worm
@globalworming
Nooo @etavela how could you abondon us! Traitor! 😁 Seriously though, kudos to @jan-molak for handling the JS side of serenity so well
3 replies