UNPKG

webdriverjs

Version:

A nodejs bindings implementation for selenium 2.0/webdriver

19 lines (10 loc) 423 B
module.exports = function setOrientation (orientation, callback) { if(arguments.length !== 2 || typeof orientation !== 'string') { return callback(new Error('number or type of arguments don\'t agree with setOrientation command')); } this.orientation(orientation.toUpperCase(), function(err, res) { if(typeof callback === 'function') { callback(err,res); } }); };