Skip to content

Commit

Permalink
test: Add a test for HideKeyboard(string key) method (#768)
Browse files Browse the repository at this point in the history
* test: Add a test for HideKeyboard(string key) method

* fix: update bool naming
  • Loading branch information
Dor-bl authored Mar 31, 2024
1 parent 58dcac2 commit f6812ce
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions test/integration/Android/Device/KeyboardTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,21 @@ public void IsKeyBoardShownTestCase()
var text_edit_btn = By.Id("io.appium.android.apis:id/left_text_edit");
_driver.FindElement(text_edit_btn).Clear();
_driver.FindElement(text_edit_btn).Click();
bool keyboard_bool = _driver.IsKeyboardShown();
Assert.That(keyboard_bool);
bool is_visible = _driver.IsKeyboardShown();
Assert.That(is_visible);
}

[Test]
public void HideKeyBoardWithKeyTestCase()
{
_driver.StartActivity("io.appium.android.apis", ".app.CustomTitle");
var text_edit_btn = By.Id("io.appium.android.apis:id/left_text_edit");
_driver.FindElement(text_edit_btn).Clear();
_driver.FindElement(text_edit_btn).Click();
_driver.HideKeyboard("Enter");
bool is_visible = _driver.IsKeyboardShown();
Assert.That(!is_visible);
}

}
}

0 comments on commit f6812ce

Please sign in to comment.