Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 12:29
    viper3400 commented #881
  • 09:32
    tsche123 opened #881
  • 05:40
    andreasmarkussen commented #563
  • 05:40
    andreasmarkussen commented #563
  • Jun 20 01:03
    renovate[bot] opened #880
  • Jun 20 01:03

    renovate[bot] on test-dependencies

    chore(deps): update dependency … (compare)

  • Jun 18 20:51
    renovate[bot] opened #879
  • Jun 18 20:51

    renovate[bot] on eslint-7.x

    chore(deps): update dependency … (compare)

  • Jun 18 08:31
    renovate[bot] opened #878
  • Jun 18 08:31

    renovate[bot] on mocha-9.x

    chore(deps): update dependency … (compare)

  • Jun 18 07:21
    renovate[bot] edited #774
  • Jun 18 07:21
    renovate[bot] synchronize #774
  • Jun 18 07:21

    renovate[bot] on selenium-webdriver-4.x

    chore(deps): update dependency … (compare)

  • Jun 18 04:57
    renovate[bot] opened #877
  • Jun 18 04:57

    renovate[bot] on gh-pages-3.x

    chore(deps): update dependency … (compare)

  • Jun 18 00:56
    renovate[bot] synchronize #827
  • Jun 18 00:56

    renovate[bot] on gherkin-9.x

    fix(deps): update dependency gh… (compare)

  • Jun 18 00:52
    renovate[bot] synchronize #774
  • Jun 18 00:52

    renovate[bot] on selenium-webdriver-4.x

    chore(deps): update dependency … (compare)

  • Jun 17 23:51

    jan-molak on webdriverio

    chore(deps): update dependency … fix(deps): update dependency @b… chore(deps): update dependency … and 12 more (compare)

Lokesh Babu Mani
@lokezhbabuofficial
Yeah sounds fair but assume these Tasks need some input to perform an interaction
Jan Molak
@jan-molak
Sure, what sort of input?
Lokesh Babu Mani
@lokezhbabuofficial
Like a json from the server, Actually by back tracking my problem I could potentially store the json in the state and perform my Task that could resolve my problem without having a feature file though.
Any links I could refer for storing some data on serenity state @jan-molak .?
Jan Molak
@jan-molak
Sure, have a look at the ability to TakeNotes in the Core module
Lokesh Babu Mani
@lokezhbabuofficial
Thanks
viper3400
@viper3400
Hi @jan-molak
Got a question to Text.ofAll. As in https://github.com/serenity-js/full-stack-acceptance-testing-demo/blob/master/spec/ui/app.spec.ts I try to ensure, that all items in a UI table match a given list of expected values. The problem is that Ensure.that(Text.ofAll(xxx),equals(['x','y','z']) will check the order of the items as well, which is absolutely as assumed. But the results in my table won't be in the same order, what is assumed as well. So how could I ensure, that all items (and not more) are in this table? Is there an alternative to equals I haven't found, yet. I've implemented a Loop as workaround, but it will only check each item for it's own.
32 replies
Kyrie Irving
@mnajibb_twitter

Hi guys, maybe this question is out of our main topic, but i think i need an advice and suggestions :

  • Do we able to automate features on the web like : login to the app by gmail or facebook? or even so, sign up to the app by gmail?
  • If it's possible, whats the best practice to implement it? (as far as i know, google will assuming me as a bot when login with automations, but do we have any workarounds?)
  • If it's not possible, whats the arguments that i need to communicate with my clients?

Any feedbacks is really appreciated guys, thanks!

8 replies
ssrinivasKG
@ssrinivasKG
@jan-molak any advice for creating Composite Steps in Serenity-JS or even how would one re-use existing steps encompassing multiple actors to create a Given step? any advice / thoughts? :)
3 replies
Lokesh Babu Mani
@lokezhbabuofficial
@jan-molak did we encounter any issues after upgrading the chromedriver to 90.0.0.
Jan Molak
@jan-molak
@lokezhbabuofficial - this is a defect in Cucumber 7.2.0 I too found last night; I reported it here - cucumber/cucumber-js#1646, please feel free to upvote. In the meantime, downgrade Cucumber to 7.1.0
Lokesh Babu Mani
@lokezhbabuofficial
Oh ok let me check.
Daniel Montesinos
@damonpam
Hi, is it possible to create an Actor with custom attributes, i.e. the email, username, etc.?
45 replies
Jan Molak
@jan-molak
Hey folks, Serenity/JS 2.26.2 is available, so please run npm update to take advantage of the latest improvements. Also, if you're using Cucumber.js v7, please make sure you're running 7.2.1 - see cucumber/cucumber-js#1646
Daniel Montesinos
@damonpam

Hello guys! is it possible to loop a task ?

something like this:

  for (const { orderId, orderLines } of orders) {
    await actor.attemptsTo(AcceptOrRefuseOrderLines(orderId, orderLines));
  }
5 replies
Daniel Montesinos
@damonpam
Having 2 request, where the second one depends on the response of the first one... what is the best alternative to save and pass the data? using notes?
40 replies
Daniel Montesinos
@damonpam
Hey guys, is there any way to add cookies to the browser? I see there is an Interaction to delete them... thanks in advance!
5 replies
Jan Molak
@jan-molak
Hey folks, version 2.27.0 is now available on npm, please run npm update :-)
2 replies
Jan Molak
@jan-molak
Huge thank you to @toniisidoro-sofist for becoming a GitHub Sponsor of Serenity/JS! :bow:
viper3400
@viper3400
@jan-molak: Is https://github.com/serenity-bdd/serenity-cli still the current repository for the serenity cli is downloaded by Serenity/JS from https://search.maven.org/artifact/net.serenity-bdd/serenity-cli ? Tags at GitHub seems not up to date. Want to raise a small issue there. Even when you call the serenity-cli jar with source and destination arguments (pointing to a custom directory) the default directory ./target/site/serenityis created empty.
12 replies
spmiller
@spmiller

Hi team, has anybody had any experience with the combination of protractor-flake and SerenityJS? We have some flakey tests, and while we track them down we're using protractor-flake to re-run the test suite again. This works, but the Serenity report gets confused and combines data for both the failed execution and the later successful one.

I was wondering if anybody had managed to get multiple executions of the same test rendered correctly in the report.

Jan Molak
@jan-molak
I haven't tried protractor-flake, but nowadays both Mocha and Cucumber have a nice retry mechanism Serenity/JS supports. What test runner are you using?
spmiller
@spmiller
We're using Cucumber, but we couldn't get the retry mechanism to work. Maybe I should have a go at a minimal example for us to look at
Jan Molak
@jan-molak
spmiller
@spmiller
Ooh, thanks, that's new since I last looked. I'll give it a go!
Jan Molak
@jan-molak
You're welcome! Serenity/JS is evolving all the time :)
spmiller
@spmiller
Hi @jan-molak, I tried passing through the retry argument as shown in the example and it all worked great. The reports show the second execution right after the first, which should work for us. Thanks for your help!
1 reply
Side note -- I noticed that the step definitions in the cucumber/protractor template could be converted to use cucumber expressions -- fancy a PR for this?
3 replies
Kyrie Irving
@mnajibb_twitter

Hi guys, im currently implementing serenityJS with protractor and jasmine, when i tried to run npm ci, it got tons of warning from npm :

npm ci
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'acceptance-tests@1.0.0',
npm WARN EBADENGINE   required: { node: '^10 || ^12 || ^14', npm: '^6 || ^7' },
npm WARN EBADENGINE   current: { node: 'v15.11.0', npm: '7.10.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@serenity-js/assertions@2.28.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || ^16', npm: '^6 || ^7' },
npm WARN EBADENGINE   current: { node: 'v15.11.0', npm: '7.10.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@serenity-js/console-reporter@2.28.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || ^16', npm: '^6 || ^7' },
npm WARN EBADENGINE   current: { node: 'v15.11.0', npm: '7.10.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@serenity-js/core@2.28.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || ^16', npm: '^6 || ^7' },
npm WARN EBADENGINE   current: { node: 'v15.11.0', npm: '7.10.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@serenity-js/jasmine@2.28.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || ^16', npm: '^6 || ^7' },
npm WARN EBADENGINE   current: { node: 'v15.11.0', npm: '7.10.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@serenity-js/protractor@2.28.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || ^16', npm: '^6 || ^7' },
npm WARN EBADENGINE   current: { node: 'v15.11.0', npm: '7.10.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@serenity-js/rest@2.28.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || ^16', npm: '^6 || ^7' },
npm WARN EBADENGINE   current: { node: 'v15.11.0', npm: '7.10.0' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@serenity-js/serenity-bdd@2.28.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || ^16', npm: '^6 || ^7' },
npm WARN EBADENGINE   current: { node: 'v15.11.0', npm: '7.10.0' }
npm WARN EBADENGINE }
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated tslint@6.1.3: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.

> acceptance-tests@1.0.0 postinstall
> serenity-bdd update

Looks like you need the latest Serenity BDD CLI jar. Let me download it for you...
Downloading https://repo1.maven.org/maven2/net/serenity-bdd/serenity-cli/2.3.31/serenity-cli-2.3.31.jar to node_modules/@serenity-js/serenity-bdd/cache/serenity-cli-2.3.31.jar.download
[====================] Downloaded 100% at 2160779bps. We should be done in about 0.0s
Verifying checksums...
Downloaded node_modules/@serenity-js/serenity-bdd/cache/serenity-cli-2.3.31.jar

added 307 packages, and audited 308 packages in 54s

25 packages are looking for funding
  run `npm fund` for details

anybody knows why it got so much warning messages? thanks!

Jan Molak
@jan-molak
Hey, looks like you're using Node 10.x which has reached its end-of-life. Please upgrade to v. 12, 14 or 16
Apologies, I'm on my mobile so reading the error was a bit tricky.
You're actually on version 15, which is not a long-term-support version of node runtime. Please upgrade to 16. (And even number version is a long term support version. Odd number versions should generally be avoided for production code)
Kyrie Irving
@mnajibb_twitter
@jan-molak ahh i see, so i need to ugrade my node version into 16. Thanks for fast response Jan!
Kyrie Irving
@mnajibb_twitter

Hi guys, again sorry for too much asking x_x
I need suggestions on environments variable in our automation scripts, currently, our developers team try to create environments for their development app divided into 3 env (development, staging and production) and currently, our environment variables for automation scripts on this env are still hardcoded like for example:

it(`User try to create projects`, () =>
        actorCalled('Najib')
            .attemptsTo(
                UseAngular.disableSynchronisation(),
                Navigate.to('https://dev-xxx.com/'), // ---> this one should be dynamically by env
                // insert automation code here

            )
    );

Do you guys have any suggestions or have experience this topic for implementing dynamic env on serenityJS? i mean that it should be dynamic instead of hardcoded so that it can be easily implemented in our CI/CD

any suggestions is really appreciated guys, thanks!

5 replies
Jacob Vu
@Jacobvu84
Hi Team. I am new
Do we have any guide to generate project automatically ?
5 replies
Manuel Fidalgo Sicilia
@manuelfidalgo
Hi @jan-molak !
Is there any way of sharing Notes/vars between 2 different actors?
I have a scenario with 2 different actors: the first uses the application and the second one cleans the data generated by tests by using an api. The problem is that actor#1 "sees" the id of the element that should be deleted and I don't know how to pass that id to actor #2.
2 replies
derek-charles
@derek-charles

I have been working on creating an adaptor to integrate Serenity/JS & Cypress but ran into this same Serenity module error that @abhinaba-ghosh encountered last year around this time. Is there a known workaround for this? Or is Serenity-Core just not compatible with Cypress ?

Serenity core (the IO package to be precise) has a dependency on the file system (fs module) and the module loader uses some node-specific functions to do dynamic module loading .

6 replies
viper3400
@viper3400

Hi @jan-molak
I try to do a post request with a dynamic id. The id is a response of a former API call.

TakeNote.of(LastResponse.body().map(() => (value) => value.fileId)).as('fileid'),
Log.the(Note.of('fileid'))

This works fine so far. But how can I use the content of this note in the following next request:

Send.a(PostRequest.to('api/target').with((stringify({
         otherRequest: { somevalue: 'x', fileid: q`${Note.of('fileid')}` }
         })))

I read through the gitter chats but still struggle with that. For example:

 Log.the(stringify({
         otherRequest: { somevalue: 'x', fileid: q`${Note.of('fileid')}` }
         }))

will result in

{
    "otherRequest": {
        "somevalue": "x",
        "fileid": {
            "subject": "{}",
            "description": "{}"
        }
    }
}

Just putting the Note.of('fileid') into the object will also not result in the value. How could I achive, that the real id is passed to the request body?

{
    "otherRequest": {
        "somevalue": "x",
        "fileid": "54545.xxx"
    }
}
6 replies
Jan Molak
@jan-molak
Hey folks, I continue to work on adding support for WebdriverIO and updated the list of outstanding tasks; feel free to follow this ticket if you're interested in this subject - serenity-js/serenity-js#805
Jan Molak
@jan-molak
Hey guys, quick note that I'm planning to change the API of Attribute from Attribute.of(target).called(name) to Attribute.called(name).of(target).
This way it will be possible to use Attribute as a filter, for example:
                    <html>
                        <body>
                            <ul>
                                <li class="enabled">one</li>
                                <li class="disabled">two</li>
                                <li class="enabled">three</li>
                            </ul>
                        </body>
                    </html>
        const ItemsOfInterest = Target.all('items of interest').located(by.tagName('li'))
            .where(Attribute.called('class'), equals('enabled'))
        Ensure.that(Text.ofAll(ItemsOfInterest), equals(['one', 'three'])),
1 reply
Jan Molak
@jan-molak
Hey guys, Chrome/chromedriver 91 introduced a change that breaks Selenium 3 and therefore Protractor 7 element.getAttribute() call - https://bugs.chromium.org/p/chromium/issues/detail?id=1205107&start=300
There's a PR proposed to address this issue - angular/protractor#5516
3 replies
Jan Molak
@jan-molak
Hey folks, here's my new article on how ChromeDriver 91 might break tests running Selenium 3. Thoughts and feedback welcome! - https://janmolak.com/chrome-91-might-break-your-tests-507309b9b2cd
3 replies
Alverel
@Alverel
Hi everyone, I am trying to use the Scroll action in one of my test, using a cucumber/protractor/serenity solution. It works well on Chrome but not on Firefox : WebDriverError: HTTP method not allowed .
Version: geckodriver 0.29.0
Platform: Windows 10
Firefox: 78.11.0esr (64 bits)
Is it something known ? Or some of you succeed to make it work ?
13 replies
Jan Molak
@jan-molak
Hi folks, I've just published version 2.29.1 with support for Chrome 91 and improved ESlint rules, courtesy of @damonpam :)
Jan Molak
@jan-molak
I've just started a new Contributors Channel so if you're interested in contributing new features/documentation/bug fixes - let's talk about it there :-)
spmiller
@spmiller

Hi team, we're having a bit of trouble with a page that isn't 'regular' JS/HTML. The page is basically a canvas, so to run our assertions we're forced to use ExecuteScript to interact with the library that draws the canvas because we can't observe the page directly.

The problem is when we want to write a Question that uses ExecuteScript, because we get all twisted up trying to convert the Interaction into something suitable for the Question interface.

Ideally we would have a Question.about() that combines both ExecuteScript.sync() and LastScriptExecution.result<string>() to produce a Question<Promise<string>>. Has anybody got any tips?

10 replies
Jan Molak
@jan-molak
Hi all, I've just published Serenity/JS 2.29.3 with support for Cucumber 7.3.0
Lokesh Babu Mani
@lokezhbabuofficial
@jan-molak just wanted to know will there be a support of cypress in future on serenity is for now only planned for wdio?
2 replies
Ok also just curious any ETA you planned on the WDIO release?