Search code examples
appiumsendkeysappium-android

Appium SendKey issue


I am facing issues when using sendkeys with appium below are the details

Appium version -1.3.4.1 ,java client - java-client-2.1.0 ,android Device - Samsung Galaxy S4(Phone) ,Android Version - 4.4.2

Application under test - flipkart/Wego android Application

Q. when i am using sendKeys to send a sting value in the Edit view what is happening is

  1. sometime string value entered is "correct" -Mumbai
  2. but sometime string value entered is "not correct" -Mmbai

here is my code

driver.findElement(By.xpath("//*[@resource-id='com.wego.android:id/flight_search_location_textview']")).sendKeys("Mumbai");

please help as I am stuck here and do not know what to do


Solution

  • try this

    Webelement enterText = driver.findElement(By.xpath("//*[@resource-id='com.wego.android:id/flight_search_location_textview']"));

    enterText.sendKeys("Mumbai");