wp-e2e-webdriver
v0.16.1
Published
Webdriver manager and helper for WP end-to-end tests
Downloads
88
Readme
wp-e2e-webdriver
Webdriver manager and helper for WordPress. Most of the good stuff were shamelessly copied from wp-e2e-tests. Thanks to wp-e2e-tests authors and contributors for providing the foundation!
This package provides WebDriver manager and helper to help you test WordPress site.
By default, this package uses chromedriver, but you can optionally install other drivers such as geckodriver or use remote webdriver via Sauce Labs.
Install
npm install wp-e2e-webdriver
Usage
import { By } from 'selenium-webdriver';
import { WebDriverManager, WebDriverHelper as helper } from 'wp-e2e-webdriver'
const manager = new WebDriverManager( 'chrome' );
const driver = manager.getDriver();
driver.get( 'https://automattic.com/work-with-us/' );
helper.waitTillPresentAndDisplayed(
driver,
By.css( '#content' )
);
Docs
Dependents
The reason we pulled out manager and helper from wp-e2e-tests so that following dependents can use that:
- wp-e2e-page-objects — Repo will be published later. WordPress Page Objects package
- wc-e2e-page-objects — WooCommerce Page Objects package
- WordPress plugin or WooCommerce extensions that will have e2e tests that use wp-e2e-page-objects or wc-e2e-page-objects.