- all callbacks use result object
- custom commands, page object/section commands have same behavior/interface
- client/api property consistency
- better separation of user-defined apis and internal properties (page objects etc)
- page/section objects have full api surface
- Page objects, commands classes, having proper instanceof-checkable instances (no weird F() constructor)
- Support command overrides rather than throwing an error
- no legacy stuff
- afterEach hook can receive the browser object only in its async form
- async behavior consistency/clarity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chromedriver = require('chromedriver'); | |
var moduleFolder = '../../node_modules/chromedriver/lib/chromedriver/'; | |
var path = require('path'); | |
var binPath = path.resolve(path.join(moduleFolder, process.platform === 'win32' ? 'chromedriver.exe' : 'chromedriver')); | |
module.exports = { | |
defaultInstance : null, | |
start : function() { | |
this.defaultInstance = require('child_process').execFile(binPath, [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
groupGlobals : null, | |
checkGroupGlobals : function(hookName) { | |
if (hookName && this.groupGlobals) { | |
return this.groupGlobals[hookName]; | |
} | |
if (this.test_settings.group_name) { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.assertion = function(selector) { | |
this.selector = selector; | |
this.message = 'Testing if element <' + selector + '> has no descendents.'; | |
this.expected = true; | |
this.pass = function(value) { | |
return value && (value.length === 0); | |
}; | |
this.value = function(result) { |
When attempting to build the awesome serialport NPM package in Docker using a node alpine image, in usually failes on building the node-gyp package.
There are various workarounds which can be found online, such as this one.
However, the key ingredient is building the serialport package from source, using this line:
npm install serialport --build-from-source=serialport
First, install homebrew.
To build and install cffi
follow these steps:
- Install libffi