tap/click on search button on softkeyboard

    1. driver.sendKeyEvent(84);
      Appium says it successfully sent in the command but 'search' does not get tapped. Cursor remains in text box and results do not filter.

    2. HashMap swipeObject = new HashMap();
      swipeObject.put("keycode", 84);
      ((JavascriptExecutor ) driver).executeScript("mobile: keyevent", swipeObject);
      Appium says not yet implemented.

    3. JavascriptExecutor jse = (JavascriptExecutor) driver1; jse.executeScript("UIATarget.localTarget().frontMostApp().keyboard().buttons()['Done'].tap();");
      Appium says not yet implemented.

    4. driver.sendKeyEvent(AndroidKeyCode.ENTER, AndroidKeyMetastate.META_FUNCTION_ON);
      Appium says it successfully sent in the command but 'search' does not get tapped. Cursor remains in text box and results do not filter.

    5. driver.sendKeyEvent(AndroidKeyCode.ENTER);
      Nothing happens

原文地址:https://www.cnblogs.com/jingwei/p/4774933.html