Using built-in functionality via the wdio config file
Cross-browser testing involves setting up the testing environment, writing tests using Jasmine syntax in TypeScript, and running the tests on different browsers. This is accomplished in the config file of WebdriverIO in the capabilities section. We will extend from Chrome to Edge in the capabilities section. This also controls how many concurrent browsers will be launched in parallel with the maxInstances parameter.
Extending the wdio config file so that it supports multiple browsers
Set up wdio.conf.ts
so that it defines your test settings and browser capabilities:
// wdio.conf.ts exports.config = { specs: ['./tests/**/*.spec.ts'], maxInstances: 2, capabilities: [ { browserName: 'chrome', }, ...