@argos-ci/webdriverio
v0.7.16
Published
WebdriverIO SDK for visual testing with Argos.
Downloads
2,459
Maintainers
Readme
Official Argos WebdriverIO integration
Capture stable Argos screenshots from your WebdriverIO tests.
Visit the WebdriverIO SDK documentation for guides, the API reference, and more.
Installation
Install the SDK alongside the Argos CLI, which uploads the screenshots to Argos:
npm install --save-dev @argos-ci/webdriverio @argos-ci/cliUsage
Use argosScreenshot to stabilize the UI and capture a screenshot:
import { argosScreenshot } from "@argos-ci/webdriverio";
describe("Homepage", () => {
it("takes a screenshot", async () => {
await browser.url("http://localhost:3000");
await argosScreenshot(browser, "homepage");
});
});Screenshots are saved locally (in ./screenshots/argos by default). Upload them to Argos with the Argos CLI, usually at the end of your CI job:
npx @argos-ci/cli upload ./screenshots