.setOrientation() 建議編輯
設定目前的裝置方向。
用法
.appium.setOrientation(orientation, [callback])
範例
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');
}
};
參數
名稱 | 類型 | 描述 |
---|---|---|
orientation |
字串 | 新的裝置方向: |
callback 選用 |
函式 | 選用的回呼函式,在命令完成時呼叫。 |