How can I use this with multiple browsers in one run ?
Paris778 opened this issue · comments
Hi,
It's explained in the README. The browser settings can be overridden at runtime in your beforeAll or beforeEach hook.
Sorry, I wasn't able to make it work. Can you provide an example of how to make it work for both chrome and firefox in one run ? Thank you
Hi,
You can find in the repositories a bunch of examples.
This file shows how to override the capabilities: https://github.com/taktakpeops/jest-environment-browserstack/blob/master/packages/core/src/__tests__/switch.spec.ts
Thanks you're the best !!! And how can I automate testing for multiple browsers without copy pasting the same script with different browsers/browser versions ? (Sorry I'm trying to learn)
As we are talking about JavaScript, you could keep your different browsers definition in a file that you import whenever it's needed.
If you have a gist or a repo with an example of what you want to achieve, feel free to share it here, I will review it and share feedback.
Awesome !!! I'll work on it thanks !
Closing the issue for now. Feel free to open a new one if you find something else.