UNPKG

@serenity-js/webdriverio

Version:

Adapter that integrates @serenity-js/web with the latest stable version of WebdriverIO, enabling Serenity/JS reporting and using the Screenplay Pattern to write web and mobile test scenarios

79 lines 2.32 kB
import { type WithSerenityConfig } from './WithSerenityConfig.js'; /** * [WebdriverIO configuration object](https://webdriver.io/docs/configurationfile/), * with [Serenity/JS-specific additions](https://serenity-js.orgapi/core/class/SerenityConfig/). * * ## Integrating WebdriverIO with Serenity/JS * * ```ts * // wdio.conf.ts * import { WebdriverIOConfig } from '@serenity-js/webdriverio' * * export const config: WebdriverIOConfig = { * * framework: '@serenity-js/webdriverio', * * serenity: { * runner: 'cucumber', * // runner: 'mocha', * // runner: 'jasmine', * * crew: [ * // Optional, print test execution results to standard output * '@serenity-js/console-reporter', * * // Optional, produce Serenity BDD reports * // and living documentation (HTML) * '@serenity-js/serenity-bdd', * [ '@serenity-js/core:ArtifactArchiver', { * outputDirectory: 'target/site/serenity' * } ], * * // Optional, automatically capture screenshots * // upon interaction failure * [ '@serenity-js/web:Photographer', { * strategy: 'TakePhotosOfFailures' * // strategy: 'TakePhotosOfInteractions' * } ], * ] * }, * * // Configure your Cucumber runner * cucumberOpts: { * // see Cucumber configuration options below * }, * * // ... or Jasmine runner * jasmineOpts: { * // see Jasmine configuration options below * }, * * // ... or Mocha runner * mochaOpts: { * // see Mocha configuration options below * }, * * runner: 'local', * * specs: [ * './features/*.feature', * * // or for Mocha/Jasmine * // './*.spec.ts' * ], * * // Any other WebdriverIO configuration * } * ``` * * ## Learn more * * - [WebdriverIO configuration file](https://webdriver.io/docs/configurationfile/) * - [`CucumberConfig`](https://serenity-js.org/api/cucumber-adapter/interface/CucumberConfig/) * - [`JasmineConfig`](https://serenity-js.org/api/jasmine-adapter/interface/JasmineConfig/) * - [`MochaConfig`](https://serenity-js.org/api/mocha-adapter/interface/MochaConfig/) * * @group Configuration */ export type WebdriverIOConfig = WebdriverIO.Config & WithSerenityConfig; //# sourceMappingURL=WebdriverIOConfig.d.ts.map