Hi there,
I have a code, where the website launches on the Android real device, the web site has 2 fields a user name and password. When I send keys to user name field, the keyboard pops up. How do I dismiss this keyboard or click on done/next?
I do know hidekeyboard works on a web app. But how do you handle this on a web browser on a real device, following is my code
@Test
public void apptest1() throws Exception{
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.ANDROID);
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Device");
cap.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome");
cap.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, "100");
AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap) ;
driver.get("https://qa.abc.com/");
driver.findElementById("Username").sendKeys("Priya");
Thread.sleep(9000l);
driver.findElementById("Password").sendKeys("1234");
Thread.sleep(9000l);
driver.findElementById("registerButton").click();
}