Click and hideKeyboard not working on Appium 1.6.3, iOS 10.2

Using:
macOS Sierra 10.12.1
iPad mini 3 (real device) with iOS 10.2
Xcode 8.2
Appium 1.6.3
Appium java-client 4.1.2

Finding input fields in native app (real device) and sending keys to them works like a charm. Finding button works as well (according to the appium server debug log). Even click command executes with success, but without any effect on the app. The focus is still in the last input field.

Then I tried calling hideKeyboard before clicking on the button, as the button is hidden under the keyboard.

((IOSDriver) getWebDriver()).hideKeyboard();

Appium server log looks perfect. It finds the keyboard, calls hide_keyboard and responds with 200. But the keyboard is still there. Let alone subsequent click on the button does nothing.

I tried another hideKeyboard call (with Done and with Next):

((IOSDriver) getWebDriver()).hideKeyboard(“Done”);

Keyboard did not hide.

Could anyone share a positive experience with this or similar setup, let me know what else can I try or acknowledge an issue and provide a fixing timeline, please?

Many thanks

Hi,

iPad Air 2 simulator
Xcode 8.1
Appium 1.6.1
Appium java-client 4.1.2

I am also facing the same problem.

Have you tried taking the getting the xpath of the keyboard

Hi pavan,

Thanks for quick reply

I tried different ways using keyboard xpaths but no luck

In Java Client 4.1.2 you have special method for hide keyboard please check the Java Library

Hi pavan,

Thanks for reply.

I tried with hide keyboard method but it is not working.

can you provide the method name.

And also I am facing the issue - App is launching with blank screen(loading time multiple time rotating and then white screen) through appium tool. when I am trying manually it is launching with out rotating and it is working fine.

Thanks in advance.

Here, I try different approaches to hideKeyboard on iOS. You can try any of those.

  try {
    ((IOSDriver) driver).hideKeyboard(HideKeyboardStrategy.PRESS_KEY, "Hide keyboard");
    return;
  } catch (Exception e) {
    ex = e;
  }

  try {
    ((IOSDriver) driver).hideKeyboard(HideKeyboardStrategy.TAP_OUTSIDE);
    return;
  } catch (Exception e) {
    ex = e;
  }

  try {
    ((IOSDriver) driver).hideKeyboard();
    return;
  } catch (Exception e) {
    ex = e;
  }
}

Hi DiogoRibeiro,

Thanks for reply
How your are identifying objects on simulator with appium 1.6.1
using instruments we can record the app. in this case how we can record XCUITest objects
Thanks in advance

Hi all,

It is about a native app, so all variants of hide_keyboard are not working. The issue is actually inability to click or tap on native WebElements. It is registered on the Appium issue list as https://github.com/appium/appium/issues/7602
Closing this discussion.

1 Like