KeyboardService

Learn how to use BELLATRIX iOS KeyboardService.

Example

[TestClass]
[IOS(Constants.IOSNativeAppPath,
    Constants.IOSDefaultVersion,
    Constants.IOSDefaultDeviceName,
    AppBehavior.RestartEveryTime)]
public class KeyboardServiceTests : IOSTest
{
    [TestMethod]
    public void TestHideKeyBoard()
    {
        var textField = App.ElementCreateService.CreateById<TextField>("IntegerA");
        textField.SetText(string.Empty);

        App.KeyboardService.HideKeyboard();
    }
}

Explanations

BELLATRIX gives you an interface for easier work with device’s keyboard through KeyboardService class.

App.KeyboardService.HideKeyboard();

Hides the keyboard.