Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 23 19:05

    christian-bromann on main

    [v8] Website updates (#8834) *… (compare)

  • Sep 23 19:05

    christian-bromann on cb-website-update

    (compare)

  • Sep 23 19:05
    christian-bromann closed #8834
  • Sep 23 19:05
    christian-bromann ready_for_review #8834
  • Sep 23 18:44
    christian-bromann synchronize #8834
  • Sep 23 18:44

    christian-bromann on cb-website-update

    fix broken links (compare)

  • Sep 23 18:39
    christian-bromann synchronize #8834
  • Sep 23 18:39

    christian-bromann on cb-website-update

    add docs for individual objects… (compare)

  • Sep 23 15:01
    christian-bromann commented #8903
  • Sep 23 14:58
    nmattia commented #8903
  • Sep 23 14:54

    github-actions[bot] on v7.25.0

    (compare)

  • Sep 23 14:54

    github-actions[bot] on v7

    v7.25.0 (compare)

  • Sep 23 14:54

    github-actions[bot] on v7.25.0

    (compare)

  • Sep 23 14:50
    christian-bromann labeled #8856
  • Sep 23 14:50

    christian-bromann on v7

    [Browserstack-service] Local Ap… (compare)

  • Sep 23 14:50
    christian-bromann closed #8856
  • Sep 23 14:50

    christian-bromann on main

    [Browserstack-service] Local Ap… (compare)

  • Sep 23 14:50
    christian-bromann closed #8864
  • Sep 23 14:49

    christian-bromann on main

    Bump puppeteer-core from 17.1.3… (compare)

  • Sep 23 14:49

    christian-bromann on npm_and_yarn

    (compare)

nonamecze
@nonamecze:matrix.org
[m]
Hi, can i somehow measure time for each request? For example i would like to measure how long will it take to do this in miliseconds
5 replies
all request in that process
nonamecze
@nonamecze:matrix.org
[m]
thanks
nonamecze
@nonamecze:matrix.org
[m]
One more question please, lets say that i have this test:
and now i want to give it some sort of maximum time to complete it. Something like this: -> If this test will finish in less than a 2 seconds, it is ok. Else, if it will take longer than that, throw some error exception
is there any way to do this?
Thanks to all for any help.
Christian Bromann
@christian-bromann
just measure the time using Date.now()
Erwin Heitzman
@erwinheitzman
changing the arrow function to a regular function should allow you to do the following if I am not mistaken
it('should set a timeout specifically for this test', function () {
  this.timeout = 2000 // 2 sec
})
Christian Bromann
@christian-bromann
ah this is even better
nonamecze
@nonamecze:matrix.org
[m]
thank you!
Christoph Herold
@coeamyd
Shouldn't this also work with the arrow function?
Erwin Heitzman
@erwinheitzman
no, arrow function's do not have a this scope
Christoph Herold
@coeamyd
thx
이순한(TQA)
@soonhanlee
Can I manually trigger the beforeCommand, afterCommand event myself?
If I took a screenshot with puppeteer, I would like to trigger a command event like takeScreenshot.
Yedidya Weiner
@flaplid-jabberdack
Trying to switch the driver to an iframe using swtichTo().frame('') and it spits back an error that 'id' cannot be a string. Ive also tried driver.switchToFrame(css-selector) and that it tells me switchToFrame is not a function. Any ideas?
Christian Bromann
@christian-bromann
@soonhanlee yes, you can do browser.emit(“comand”, { … })
the payload structure should be like this:
interface Output {
    command: string
    params: any
    method: 'PUT' | 'POST' | 'GET' | 'DELETE'
    endpoint: string
    body: {}
    result: {
        value: string | null
    }
    sessionId: string
    cid: string
    type: 'command' | 'result'
}
@flaplid-jabberdack it doesn’t seem you are using WebdriverIO
이순한(TQA)
@soonhanlee
@christian-bromann Thank you!
Yedidya Weiner
@flaplid-jabberdack
silly me, eek. Thanks @christian-bromann
Rajendran Krishnamurthy
@rajukrish:matrix.org
[m]
Hi Team anybody has a solution for this [0-0] Error: Unable to load spec files quite likely because they rely on browser object that is not fully initialised.
browser object has only capabilities and some flags like isMobile.
Helper files that use other browser commands have to be moved to before hook.
Olga
@osmolyar
@nileshye yes, if you define it in the before hook, e.g.
    before: () => {
        // set up global context
        global.context = context
Olga
@osmolyar
@dmarimoutou , yes, the method using the cucumber 'world' object, accessible via 'this' in step definitions, (and via the 'world' parameter in hooks) is preferable as it's designed specifically for sharing state among steps within a scenario, as @erwinheitzman said. You can also customize the cucumber world constructor if you want to initialize it with something specific with each scenario. https://github.com/cucumber/cucumber-js/blob/master/docs/support_files/world.md
@rajukrish:matrix.org after ~v6.4 of @wdio/mocha-framework you can't use browser outside of an 'it' block due to a change in the order of loading hooks and spec files.
Rajendran Krishnamurthy
@rajukrish:matrix.org
[m]
is there anyway I can implement to follow page object pattern?
Olga
@osmolyar
@dmarimoutou if you are using typescript you have to extend the Global interface as
declare module NodeJS {
    interface Global {
       mySharedData: any
    }
}
5 replies
@rajukrish:matrix.org yes you can use it in other classes, just not in spec files outside of an 'it' block is my understanding.
Rajendran Krishnamurthy
@rajukrish:matrix.org
[m]
ok thanks Olga
dmarimoutou
@dmarimoutou
Thanks a lot @osmolyar . Do you know why I'm facing this Typescript error: Object is possibly 'undefined'.ts(2532) when I declare my shared object in my step definition like that this.mySharedData = myvalue?
Federico Francia
@federicoitaly:matrix.org
[m]
hi everybody, does anyone use parallel testing with wdio cucumberjs appium and browserstack?
Erwin Heitzman
@erwinheitzman
that's a very generic question, if you have a specific question I suggest asking that instead
Federico Francia
@federicoitaly:matrix.org
[m]
@erwinheitzman: thanks, currently I use wdio with maxInstances: 1, so it runs features sequentially
since ios tests takes long time I am wondering to run test in parallel on different devices
my worry is related to the external report
i create a json for the cucumberjs report
it works for single thread
but I increase maxInstances let's say to 2
what will happen?
Erwin Heitzman
@erwinheitzman
I think that depends on the reporter
but you'd probably get two json files
Federico Francia
@federicoitaly:matrix.org
[m]
import cucumberJson from "wdio-cucumberjs-json-reporter";
Erwin Heitzman
@erwinheitzman
however, running it once and see what happens would have been faster and more reliable then to ask here :P
Federico Francia
@federicoitaly:matrix.org
[m]
import { generate } from "multiple-cucumber-html-reporter";
1 reply
Erwin Heitzman
@erwinheitzman
I have never used that reporter myself so I don't really know how it generates files
Federico Francia
@federicoitaly:matrix.org
[m]
Davide Mariani
@davide.mariani:matrix.org
[m]
Hi there!
Kirstin Walsh
@pyxis828
For someone still stuck on version 5, is there somewhere where I can find docs on the hooks as they were in that version? I know they have different params, and I can't seem to find reference docs now - the site will only take me to the version 7 docs for the hooks.