public void sendKeyEvent(int code) {
HashMap<String, Integer> keycode = new HashMap<String, Integer>();
keycode.put("keycode", code);
((JavascriptExecutor)Test1.d).executeScript("mobile: keyevent", keycode);
}
But Now when am using the same way to input an alphabetical character through the softkeyboard to a text field, appium responds as if the characters has been supplied to the text field, but actually nothing happened in that text field.
Please help. Would highly appreciate your fast response as I have a critical deliverable pending due to this.
Looking forward to your responses.
Regards
Adil
Is there a reason you can't use sendKeys?
WebElement field = driver.findElement(By <your_element>)
field.sendKeys(keys);