unexpected-webdriver
A plugin for unexpected that adds assertions for the official WebDriver bindings from the Selenium project.
Assertions
<WebElement> to exist
<WebElement> to be visible
<WebElement> to contain text <string+|regexp>
<WebElement> to contain html <string+|regexp>
<WebElement> [not] to have attribute <string>
<WebElement> to have attribute <string> <string>
Options
screenshots
: Directory path, used to take a screenshot whenever a assertion fails.
Example
const webdriver = ;const expect = ; expect; const driver = ; const el = driver;;
Credits
Thanks to Bowery Boogie for their permission to use the photo of Rickshaw Spidey performing his unexpected moves.