qavajs implementation for playwright wdio fixtures. Enables features of webdriverio with playwright test runner.
npm install @qavajs/playwright-wdio
create config.ts
import Memory from './memory';
import App from './page_object';
export default {
paths: ['features/*.feature'],
require: [
'node_modules/@qavajs/playwright-wdio/steps.js', // package steps
'step_definitions/*.ts' // custom step definitions
],
memory: new Memory(),
pageObject: new App()
}
playwright.config.ts
import { defineCucumber, WdioOptions } from '@qavajs/playwright-wdio';
export default defineConfig<WdioOptions>({
testDir: defineCucumber({
config: 'config.ts',
profile: 'smoke'
}),
projects: [
{
name: 'chrome',
use: {
wdioLaunchOptions: {
logLevel: 'error',
capabilities: {
browserName: 'chrome',
"goog:chromeOptions": {
args: ['headless=new']
}
},
}
}
}
]
});
Install dependencies
npm install
Build lib
npm run build
Execute e2e browser tests
npm run test:e2e