ACTION_SET_PROGRESS has failed on the element in android

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)

make code following:

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

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.

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

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.

so does 5 sec helps?

so does 5 sec helps? Not helped

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

i have tried directly writting xpath still same exception
new DriverConfigurator().getDriver().findElementByXPath("//android.widget.EditText[@resource-id=‘accNum’]").click(); // click is working fine
basePage.medWait();// 5 sec wait
new DriverConfigurator().getDriver().findElementByXPath("//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[@resource-id=‘accNum’]").click(); // click is working fine.
basePage.medWait();
((AndroidElement) new DriverConfigurator().getDriver().findElementByXPath("//android.widget.EditText[@resource-id=‘accNum’]")).setValue(“987654321”); // setValue is not working. Same Exception

1 Like

no anything bad in code. only use better:

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:

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

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

Solution:

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