codeceptjs
Advanced tools
Changelog
3.6.4
❤️ Thanks all to those who contributed to make this release! ❤️
🛩️ Features
Config:
...
REST: {
...
printCurl: true,
...
}
...
› [CURL Request] curl --location --request POST https://httpbin.org/post -H ...
askForPageObject
method to generate PageObjects on the fly🐛 Bug Fixes
📖 Documentation
Changelog
3.6.3
❤️ Thanks all to those who contributed to make this release! ❤️
🛩️ Features
🐛 Bug Fixes
📖 Documentation
Changelog
3.6.2
❤️ Thanks all to those who contributed to make this release! ❤️
🛩️ Features
Support the httpAgent conf to create the TSL connection via REST helper
{
helpers: {
REST: {
endpoint: 'http://site.com/api',
prettyPrintJson: true,
httpAgent: {
key: fs.readFileSync(__dirname + '/path/to/keyfile.key'),
cert: fs.readFileSync(__dirname + '/path/to/certfile.cert'),
rejectUnauthorized: false,
keepAlive: true
}
}
}
}
Currently only screenshot of the active session is saved, this PR aims to save the screenshot of every session for easy debugging
Scenario('should save screenshot for sessions @WebDriverIO @Puppeteer @Playwright', async ({ I }) => {
await I.amOnPage('/form/bug1467');
await I.saveScreenshot('original.png');
await I.amOnPage('/');
await I.saveScreenshot('main_session.png');
session('john', async () => {
await I.amOnPage('/form/bug1467');
event.dispatcher.emit(event.test.failed, this);
});
const fileName = clearString('should save screenshot for active session @WebDriverIO @Puppeteer @Playwright');
const [original, failed] = await I.getSHA256Digests([
`${output_dir}/original.png`,
`${output_dir}/john_${fileName}.failed.png`,
]);
// Assert that screenshots of same page in same session are equal
await I.expectEqual(original, failed);
// Assert that screenshots of sessions are created
const [main_original, session_failed] = await I.getSHA256Digests([
`${output_dir}/main_session.png`,
`${output_dir}/john_${fileName}.failed.png`,
]);
await I.expectNotEqual(main_original, session_failed);
});
Find an element with class attribute
// find div with class contains 'form'
locate('div').withClassAttr('text');
url: siteUrl,
windowSize: '300x500',
show: false,
restart: true,
browser: 'chromium',
trace: true,
video: true,
recordVideo: {
size: {
width: 400,
height: 600,
},
},
🐛 Bug Fixes
📖 Documentation