node v6.4.0
git clone https://github.com/mrt123/mochanium.git
cd mochanium
$ npm install
$ npm test
- Operator - encapsulates user interactions, aids user logic when evaluating DOM
- Views - concerned with reliable DOM querying
- Mappings - help maintain DOM hooks in a large application over time
- Use Operator to encapsulate user interaction eg
operator.doSomething();
- Use Operator to aid user logic on evaluating DOM eg
assert.equal(operator.isPurchaseComplete(), true);
- Use View to fetch DOM for simple assertion eg
view.getEl.getText().then(...assert...);
- Use View to hide DOM querying, eg
operator.results.getNth(5).then(...assert...);
- Do not use Mappings
- Bloating operators with DOM evaluating logic that is likely never appear in other test flows. Instead contain logic in test block.
- switch to ES6
- for auto-complete add these libraries ** 'Node Core Modules' ** create : 'selenium-webdriver' : add folder 'node_modules/selenium-webdriver/lib'
- for Debug :
** ensure your run configuration:
*** runs from root of this repo
node start
*** has correct node interpreter setup (eg: if you're using NVM: /Users/username/.nvm/versions/node/vX.X.X/bin/node)
- WebdriverJS API
- Webdriver Control Flow
- Selenium Tips - css selectors
- Mocha
- Chaijs
- CSS Selectors to use with locators
- WebDriverIO is a good candidate to run test synchronously via its test runner, however is completly redundant, considering WebdriverJs asynch tasks are coordinated with Control Flow. And also:
** works only on select undocumented selenium servers : example ** supports only a sub-set of WebDriver API ** compatibility with specific Node version is undocumented ** requiresJava Selenium Server downloaded and started separately ** website with guide is not kept up to date, and differs with gitHub readme