Is there a way i can select complete text in a edit field and delete. I am trying to automate mobile app using Selenium Appium and Java and there is a field which has 10-15 characters. I want to delete the existing content in the field and then update it with .sendkeys() command.
driver.findElement(By.xpath("elmentpath")).clear(); -- does not work also driver.findElement(By.xpath("elmentpath")).click(); -- this command clicks on center of the string after which if i run driver.sendKeyEvent(AndroidKeyCode.BACKSPACE); --- it clears only half of the string so if there is way to click at the end of string i can run driver.sendKeyEvent(AndroidKeyCode.BACKSPACE); -- command in a loop with string length. PLease help