@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.
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?
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.
@pyxis828 the documentation keeps updating, I suggest to take the latest documentation in cases where you feel you are missing some details
Clive Galway
@evilC
Hi, could anyone advise how I would use multiremote with wdio/cucumber-framework? To be more specific I am trying to do automated testing of a chat-type application (ie two browsers open, one for each side of a conversation)
Kirstin Walsh
@pyxis828
@erwinheitzman I appreciate your suggestion, but I know for a fact that the params were changed in version 7, and do NOT match what was there in v5 - it was a huge problem for me and 1 of the main reasons I have not yet updated to V7 (along with some other sync/async errors that I have occurring), along with the fact that I have 0 time to work on the upgrade. And now I am going to add another before hook to throw some more confusion into the mix for the future upgrade, lol