UNPKG

@testim/testim-cli

Version:

Command line interface for running Testing on you CI

35 lines (30 loc) 811 B
/** * * Set the current browser orientation. * * <example> :setOrientation.js client .setOrientation('landscape') .getOrientation(function(err, orientation) { console.log(orientation); // outputs: "landscape" }) .end(); * </example> * * @param {String} orientation the new browser orientation (`landscape/portrait`) * * @uses protocol/orientation * @type mobile * */ var ErrorHandler = require('../utils/ErrorHandler.js'); module.exports = function setOrientation (orientation) { /*! * parameter check */ if(typeof orientation !== 'string') { throw new ErrorHandler.CommandError('number or type of arguments don\'t agree with setOrientation command'); } return this.orientation(orientation.toUpperCase()); };