# ACTION\_SET\_PROGRESS has failed on the element in android

**URL:** <https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847>\
**Category:** Issues/Bugs\
**Created:** [June 1, 2021, 1:34pm UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847 "2021-06-01T13:34:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![NagarajL](https://discuss.appium.io/user_avatar/discuss.appium.io/nagarajl/32/5710_2.png) [@NagarajL](https://discuss.appium.io/u/NagarajL)\
**Post date:** [June 1, 2021, 1:34pm UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/1 "2021-06-01T13:34:50Z")

</div>

When i am trying to enter number by to text Filed using SedKeys function getting this error(Note : test Field input type is only number)

1. resourceIDEle.SendKeys(“987654321”) : always throwing title exception.
2. action.SendKeys(“987654321”) : always throwing title exception.
3. action.SendKeys(resourceIDEle, “987654321”) not throwing exception and also not entering number into text field.
4. driver.getKeyboard().presKey(“987654321”) : some time working fine and its entering number in other text field.  
driver.getKeyboard().releaseKey(“987654321”) : some time working fine and its entering number in other text field.

**Exception Details :**  
org.openqa.selenium.InvalidElementStateException: ACTION\_SET\_PROGRESS has failed on the element 'android.view.accessibility.AccessibilityNodeInfo

**Full Exception :**  
org.openqa.selenium.InvalidElementStateException: ACTION\_SET\_PROGRESS has failed on the element 'android.view.accessibility.AccessibilityNodeInfo@

4086b; boundsInParent: Rect(0, 0 - 344, 36); boundsInScreen: Rect(89, 1126 - 992, 1221); packageName: com.westernunion.android.mtapp; className: android

.widget.EditText; text: ; error: Invalid entry; maxTextLength: -1; contentDescription: null; tooltipText: null; viewIdResName: confirmAccNum; checkable:

false; checked: false; focusable: true; focused: true; selected: false; clickable: true; longClickable: false; contextClickable: false; enabled: true;

password: false; scrollable: false; importantForAccessibility: false; visible: true; actions: [AccessibilityAction: ACTION\_NEXT\_HTML\_ELEMENT - null, Acc

essibilityAction: ACTION\_PREVIOUS\_HTML\_ELEMENT - null, AccessibilityAction: ACTION\_SHOW\_ON\_SCREEN - null, AccessibilityAction: ACTION\_CONTEXT\_CLICK - nu

ll, AccessibilityAction: ACTION\_SET\_TEXT - null, AccessibilityAction: ACTION\_PASTE - null, AccessibilityAction: ACTION\_UNKNOWN - null, AccessibilityActi

on: ACTION\_CLEAR\_FOCUS - null, AccessibilityAction: ACTION\_ACCESSIBILITY\_FOCUS - null, AccessibilityAction: ACTION\_CLICK - null, AccessibilityAction: AC

TION\_SET\_PROGRESS - null]’. Did you interact with the correct element? (WARNING: The server did not provide any stacktrace information)

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [June 1, 2021, 5:04pm UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/2 "2021-06-01T17:04:39Z")

</div>

make code following:

1. tap on input field
2. find input element again
3. now send text to it or use setValue

---

<div class="post-metadata">

**Author:** ![NagarajL](https://discuss.appium.io/user_avatar/discuss.appium.io/nagarajl/32/5710_2.png) [@NagarajL](https://discuss.appium.io/u/NagarajL)\
**Post date:** [June 2, 2021, 8:48am UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/3 "2021-06-02T08:48:05Z")

</div>

**1. Using TouchAction element clicked is working fine and SendKey() and setKeys() is not working.**  
TouchAction touchAction = new TouchAction(driver); //used also AndroidTouchAction(driver)  
touchAction.tap(ElementOption.element(completeYourProfile.getAndroid\_accountNumber())).build().perform(); // Tap working fine  
completeYourProfile.getAndroid\_accountNumber().setValue(“987654321”);  
or  
completeYourProfile.getAndroid\_accountNumber().sendKeys(“987654321”);  
// not working thrown same title exception.

**2. Using Actions element clicked is working fine and Sendkey() and setKeys() is not working.**  
Actions action = new Action(driver);  
action.click(completeYourProfile.getAndroid\_accountNumber()); // click is working fine.  
completeYourProfile.getAndroid\_accountNumber().setValue(“987654321”);  
or  
completeYourProfile.getAndroid\_accountNumber().setValue(“987654321”);  
// not working thrown same title exception.  
or  
completeYourProfile.getAndroid\_accountNumber().click();// click is working fine  
action.sendKeys(); // not entering text into above element

**3) Using Actions element clicked is working fine and Sendkey() is not working.**  
Actions action = new Action(driver);  
action.click(completeYourProfile.getAndroid\_accountNumber()); // Not clicking and not thrown any Exception.  
action.sendKeys(completeYourProfile.getAndroid\_accountNumber(), “987654321”); Not sending and and not thrown any Exception.

**4) Element Click is workig fine and SendKeys() thrown same title exception**  
completeYourProfile.getAndroid\_accountNumber().click(); // click is working fine.  
completeYourProfile.getAndroid\_accountNumber().sendKeys(“987654321”) is not working thrown same title exception.

**5) using driver.getKeyboard()**  
A) completeYourProfile.getAndroid\_accountNumber().click(); // click is working fine.  
or  
B) driver.getKeyboard().presKey(“987654321”) : some time working fine and its entering number in other text field.  
or  
C) driver.getKeyboard().releaseKey(“987654321”) : some time working fine and its entering number in other text field.  
or  
D) driver.getKeyboard().SendKeys(“987654321”) : is not working thrown same title exception.

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [June 2, 2021, 9:02am UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/4 "2021-06-02T09:02:01Z")

</div>

if you add some sleep let say 5 sec between tap and setValue - does it help?

---

<div class="post-metadata">

**Author:** ![NagarajL](https://discuss.appium.io/user_avatar/discuss.appium.io/nagarajl/32/5710_2.png) [@NagarajL](https://discuss.appium.io/u/NagarajL)\
**Post date:** [June 2, 2021, 9:25am UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/5 "2021-06-02T09:25:20Z")

</div>

yes i have added 5 sec wait before sending values.

Note : this Element text field restricted as input type number And SendKeys() or setValue() supported char sequence or string.

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [June 2, 2021, 10:07am UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/6 "2021-06-02T10:07:17Z")

</div>

so does 5 sec helps?

---

<div class="post-metadata">

**Author:** ![NagarajL](https://discuss.appium.io/user_avatar/discuss.appium.io/nagarajl/32/5710_2.png) [@NagarajL](https://discuss.appium.io/u/NagarajL)\
**Post date:** [June 2, 2021, 10:08am UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/7 "2021-06-02T10:08:06Z")

</div>

so does 5 sec helps? Not helped

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [June 2, 2021, 10:31am UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/8 "2021-06-02T10:31:16Z")

</div>

show how you find element and your page source (at least inputs)

---

<div class="post-metadata">

**Author:** ![NagarajL](https://discuss.appium.io/user_avatar/discuss.appium.io/nagarajl/32/5710_2.png) [@NagarajL](https://discuss.appium.io/u/NagarajL)\
**Post date:** [June 2, 2021, 10:49am UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/9 "2021-06-02T10:49:02Z")

</div>

**i have tried directly writting xpath still same exception**  
new DriverConfigurator().getDriver().findElementByXPath("[//android.widget.EditText](https://android.widget.EditText)[@resource-id=‘accNum’]").click(); // click is working fine  
basePage.medWait();// 5 sec wait  
new DriverConfigurator().getDriver().findElementByXPath("[//android.widget.EditText](https://android.widget.EditText)[@resource-id=‘accNum’]").**sendKeys(“987654321”);** // **sendKeys is not working. Same Exception**

**Using SetValue() getting same Exception.**  
basePage.lowWait();  
new DriverConfigurator().getDriver().findElementByXPath("[//android.widget.EditText](https://android.widget.EditText)[@resource-id=‘accNum’]").click(); // click is working fine.  
basePage.medWait();  
(**(AndroidElement)** new DriverConfigurator().getDriver().findElementByXPath("[//android.widget.EditText](https://android.widget.EditText)[@resource-id=‘accNum’]")).**setValue(“987654321”);** // **setValue is not working. Same Exception**

---

<div class="post-metadata">

**Author:** ![Aleksei](https://discuss.appium.io/user_avatar/discuss.appium.io/aleksei/32/6267_2.png) [@Aleksei](https://discuss.appium.io/u/Aleksei)\
**Post date:** [June 2, 2021, 11:36am UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/10 "2021-06-02T11:36:14Z")

</div>

no anything bad in code. only use better:

```auto
driver.findElement(MobileBy.id("accNum"));

```

ok if it problem with element switch to use keyboard as it at least works for you.

to send text via keyboard use:

```auto
new Actions(driver).sendKeys(text).perform();

```

i see no ‘perform’ in your code with you try do this.

---

<div class="post-metadata">

**Author:** ![NagarajL](https://discuss.appium.io/user_avatar/discuss.appium.io/nagarajl/32/5710_2.png) [@NagarajL](https://discuss.appium.io/u/NagarajL)\
**Post date:** [August 23, 2021, 9:58am UTC](https://discuss.appium.io/t/action-set-progress-has-failed-on-the-element-in-android/33847/11 "2021-08-23T09:58:56Z")

</div>

**Solution:**

1. Click() Text Aria.
2. Enter key by using : KeyEevent in pressKey function  
((AndroidDriver) new DriverConfigurator().getDriver()).pressKey(new KeyEvent(AndroidKey.DIGIT\_1));
