@ravikr42 : I have tried this one : capabilities.setCapability("unicodeKeyboard", true);
capabilities.setCapability("resetKeyboard", true);
But keyboard is always opening in the app ....
Hi @emnn_ayadi
For the very first run after setting capabilities you will see the keyboard coming up, but from the second run onward soft keyboard will not come, and internally it sets default keyword as "Appium Android Input Manager" as suggested by Talmo.
Just try running your scripts 2 to 3 times and soft keyword wont come.
Hope this will help.
Thanks
Ravi
@ravikr42 Yes, thank you very much it's ok now but i have a new problem that i couldn't find a solution yet !
Sendkeys didn't work as expected, it sends more than i give to it.
I'm using Appium to write test cases of an Android application, when i tap the following code
public void EnterQuantity() {
wd.findElement(By.xpath("//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.ScrollView[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[3]/android.widget.LinearLayout[3]/android.widget.LinearLayout[1]/android.widget.EditText[1]")).sendKeys("1");
}
I get 11 in Quantity field instead of 1. How can i reduce the speed of writing in order to be sure that only the number i gave is written not doubled.
Hi @Emna
Try using with some sleep time or use explicit wait. I guess it will work , if not please let me know.
Thanks
Hi @ravikr42 ,
capabilities.setCapability("newCommandTimeout","60");
wd.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
i'm using this one and i do some thread.sleep(1000); before sendkeys("1")
But the problem this error occur not all the time let's say 70%
In Debug mode it's working fine .
For the very first run after setting capabilities you will see the keyboard coming up, but from the second run onward soft keyboard will not come, and internally it sets default keyword as "Appium Android Input Manager"
Just try running your scripts 2 to 3 times and soft keyword wont come.
Hi Ravi,
Tried running the script multiple times but no success. Even checked the keyboard settings but not found "Appium Android Input Manager" in the keyboard list.
After trying mentioned ways on web. I just thought to try other way, even though it is not correct but I had spent more time with this issue I tried following shortcut method:
After getting soft keyboard I just refreshed the page.
webdriver.navigate().refresh();
Please let me know if you have any suggestion.
Thanks Ravi.
Why not simple select an other element and click() on it to hide the keyboard? Like this:
await driver.waitForElementByAccessibilityId(‘donglePin’, 20000).elementByAccessibilityId(‘donglePin’).setText(donglePin);
await driver.waitForElementByAccessibilityId(‘donglePinEntryIcon’, 20000).elementByAccessibilityId(‘donglePinEntryIcon’).click(); //keyboard is hidden now