Skip to content
A stab at using page objects with mocha and webdriverjs.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test Upgrade selenium to 3.5. Apr 25, 2019
.gitignore Initial commit. May 8, 2015
.travis.yml
README.md
package.json Upgrade selenium to 3.5. Apr 25, 2019

README.md

mocha-webdriver-page-objects-example

build status

A stab at using page objects with mocha and webdriverjs.

This is a first go at trying to apply the page object model pattern to functional tests using mocha and the webdriver js bindings. I wrote this out because I couldn't find any other examples elsewhere. Feel free to submit a pull request if you spot anything that could be done better.

Get started

You'll need to have the Chromedriver on your path. Grab it from here, and then make sure the location it is in is added to your PATH environment variable. To test it is setup correctly, try typing in a terminal:

chromedriver

If you get a message saying 'Starting Chromedriver' then you're good to go.

Next, clone the repo, and then install dependencies:

npm install

Then run the tests:

node_modules/mocha/bin/mocha
You can’t perform that action at this time.