Emna Ayadi
Emna Ayadi

Reputation: 2460

In Appium Sendkeys didn't work as expected, it sends more than i give to it

I'm using Appium to write test cases of an Android application, when i tap 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 Quantity field instead of 1. How can i reduce the speed of writing in order to be sure that only the number i gave is written not doubled.

Upvotes: 2

Views: 557

Answers (2)

karthick23
karthick23

Reputation: 1331

@Emna I beleieve it calls the EnterQuantity() twice . try to add click element(eg. submit button) inside this function to narrow down the root cause

Upvotes: 1

Chandrashekhar Swami
Chandrashekhar Swami

Reputation: 1780

Try changing your Auto-Correction setting from Language & Input Setting in android Device manually

Upvotes: 2

Related Questions