Skip to content

Commit f6812ce

Browse files
authored
test: Add a test for HideKeyboard(string key) method (#768)
* test: Add a test for HideKeyboard(string key) method * fix: update bool naming
1 parent 58dcac2 commit f6812ce

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

test/integration/Android/Device/KeyboardTests.cs

+15-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,21 @@ public void IsKeyBoardShownTestCase()
4747
var text_edit_btn = By.Id("io.appium.android.apis:id/left_text_edit");
4848
_driver.FindElement(text_edit_btn).Clear();
4949
_driver.FindElement(text_edit_btn).Click();
50-
bool keyboard_bool = _driver.IsKeyboardShown();
51-
Assert.That(keyboard_bool);
50+
bool is_visible = _driver.IsKeyboardShown();
51+
Assert.That(is_visible);
5252
}
53+
54+
[Test]
55+
public void HideKeyBoardWithKeyTestCase()
56+
{
57+
_driver.StartActivity("io.appium.android.apis", ".app.CustomTitle");
58+
var text_edit_btn = By.Id("io.appium.android.apis:id/left_text_edit");
59+
_driver.FindElement(text_edit_btn).Clear();
60+
_driver.FindElement(text_edit_btn).Click();
61+
_driver.HideKeyboard("Enter");
62+
bool is_visible = _driver.IsKeyboardShown();
63+
Assert.That(!is_visible);
64+
}
65+
5366
}
5467
}

0 commit comments

Comments
 (0)