Set the current device orientation.

Usage

                    .appium.setOrientation(orientation, [callback])
                

Example

module.exports = {
  'set orientation to LANDSCAPE': function (app) {
    app
      .appium.setOrientation('LANDSCAPE');
  },

  'set orientation to PORTRAIT with ES6 async/await': async function (app) {
    await app.appium.setOrientation('PORTRAIT');
  }
};

Parameters

Name Type description
orientation string

The new device orientation: LANDSCAPE or PORTRAIT.

callback
Optional
function

Optional callback function to be called when the command finishes.

See also