Skip to content

Commit

Permalink
test: add IsKeyBoardShown Test (#696)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dor-bl authored Nov 22, 2023
1 parent db85e3c commit 499530c
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Appium.Net.Integration.Tests.Android.Device.Keys
{
class HideKeyboardTestCase
class KeyboardTests
{
private AndroidDriver _driver;

Expand Down Expand Up @@ -34,8 +34,21 @@ public void AfterAll()
public void HideKeyBoardTestCase()
{
_driver.StartActivity("io.appium.android.apis", ".app.CustomTitle");
_driver.FindElement(By.Id("io.appium.android.apis:id/left_text_edit")).Clear();
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();
}

[Test]
public void IsKeyBoardShownTestCase()
{
_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();
bool keyboard_bool = _driver.IsKeyboardShown();
Assert.IsTrue(keyboard_bool);
}
}
}

0 comments on commit 499530c

Please sign in to comment.