是否顯示軟鍵盤。

用法

                    .appium.isKeyboardShown([callback])
                

範例

module.exports = {
  'whether keyboard is shown': function (app) {
    app
      .appium.isKeyboardShown(function (result) {
        console.log('result value of whether keyboard is shown:', result.value);
      });
  },

  'whether keyboard is shown with ES6 async/await': async function (app) {
    const result = await app.appium.isKeyboardShown();
    console.log('result value of whether keyboard is shown:', result);
  }
};

參數

名稱 類型 描述
callback
可選
function

使用結果值呼叫的回呼函式。

回傳

類型 描述
boolean

如果鍵盤顯示則為 True。

另請參閱