Appium Sendkeys does not work properly, it sends more than I give it

I use Appium to write test cases for an Android application when I click the following code

public void EnterQuantity() { wd.findElement(By.xpath("//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.ScrollView[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[3]/android.widget.LinearLayout[3]/android.widget.LinearLayout[1]/android.widget.EditText[1]")).sendKeys("1"); } 

I get 11 in the Number field instead of 1. How can I reduce the write speed to be sure that only the number I gave is not written twice.

+1
source share
2 answers

Try changing the automatic correction setting in the language and input settings in the Android device manually

0
source

@Emna I believe that he calls EnterQuantity() twice. try adding a click element (like a submit button) inside this function to narrow down the root cause

0
source

All Articles