In accordance with the requirements of the project, I am working on the automation of mobile applications. Not a problem arises when I execute the same code that works fine on the emulator, but when it comes to the real device, the same code fails. The problem is that UiAutomator cannot find the item because the built-in keyboard comes in front of the application during the simulation. I did all this in Galaxy nexus, which is working on ANDROID API 18. You should not run whole automation kits in Selendroid mode. in the lower code, after filling in the value in the first edit field, the control should have reached the second editing field to fill in the value, etc. But it does not fill in the value there, because the built-in keyboard appears in front of the application.
SwipeableWebDriver driver = new SwipeableWebDriver( new URL("http://127.0.0.1:4723/wd/hub"), capabilities); List<WebElement> editTextList = driver.findElements(By .className("android.widget.EditText")); editTextList.get(0).sendKeys(c + "Bob"); editTextList.get(1).sendKeys("123"); editTextList.get(2).sendKeys("456"); el = driver.findElement(By.className("android.widget.Button")); el.click();
Please, who has an idea to solve this problem? Thanks in advance.
Priyank Shah
source share