WebdriverIO framework that uses ES6 (with Babel), Cucumber, Chai, Page Object model, Appium and more.
Note that this is a real world example and uses the Net A Porter website (http://www.net-a-porter.com)
- Tidy up (a little more) the page objects so that browser elements are moved out of functions
- Update wdio.conf.js, again, its a bit messy, but less than before
- Add BrowserStack capability
- You are not 100% new to JavaScript or Cucumber
- You have the necessary JavaScript tools in place and installed (i.e. node)
- A fairly well put together WebDriverIO framwork for testing web apps, using JavaScript (ES6)
- Follows, generally, good JavaScript and general automation practices.
- An idea of how a framework can be setup to handle a real world app.
- Some example of basic reporting use of config files.
- A good way to see how elements can be located, though CSS selectors are of course the preferred choice.
- A good example to see Chai expectations in action.
- Good use of the Page Object Model.
- Demonstrable use of some ES6 capabilities.
- Supports Safari, on an iOS simulator (local, using Appium)
- An all-in-one super duper framework.
- Something that you can 100% copy over for any app (though I suspect you'd be able to use most, as is).
- Will not handle weird browser 'issues', (Currently only tested with Chrome)
Drop me an email, [email protected] for any comments, suggestions, etc.
- cd into webdriverio-example-framework/
- npm install (it would be useful for me to know if you suffer any obscure/weird dependency issues...if unsure, always google first!)
- npm run-script selenium-start
After cd'ing into the 'webdriverio-example-framework' directory...
Run a specific feature, with DEBUG enabled...
The DEBUG flag allows you to use the 'driver.debug();' command without having to constantly change the timeouts.
DEBUG=true wdio --spec features/search.feature
Run a suite of tests, in this instance, the 'basic' suite...
wdio --suite basic
Run a feature file for Safari on an iOS simulator...
wdio wdio.mobile.safari.config.js --spec features/safari.feature
Run tests with a specific cucumber tag...
wdio --cucumberOpts.tagExpression='@justme'
Run the parameterised mobile configuration (see package.json), which runs a specific suite (mobile, located in the wdio.conf.js file)
DEVICE_NAME="iPhone 6" PLATFORM_VERSION="11.2" npm run parameterisedappium
Note that there are a few limitations to this, in the fact that WDIO does not currently allow you start multiple instances of Appium, i.e. in does not seem to allow you to start Appium instance 'A' on port 1234 and Appium instance 'B' on port 4567. This has to be managed separately, at least from what I can tell.