Issue with activity "check element"

I am using activity “Check element” to check if the element exist in out window or not and expecting result in “true” or “False”.

If the element exist in the window it is working fine and give result as “True” but if the element doesnot exist it gives the below error instead of giving output as “False”

ERROR lines : "Check Element ‘The user’: Could not find the user-interface (UI) element for this action.

Possible solutions:
• Ensure application is opened and the UI element is visible on the screen at execution time
• Edit the Target of the UI activity and use Validation to debug the issue.
• If needed, re-indicate the element as its properties might have changed
• Use “Check state” activity to check the application state before executing the action
• Increase the “Delay before” value to allow time to the application to render entirely and become responsive"

Kindly help me in this senario

Hi @Aditi0374

Check Continue on error propery in properties panel or Try with Check App State activity

Regards,

HI @Aditi0374

This issue arise due to your parent selectors are not matching with current page.

You should modify the parent selectors to match both the web page parent selector using wild card element or regex selector.

Please share the screenshot of the selectors so that I will provide the accurate solution.

Thanks,
Purushotham

1 Like

@Aditi0374,

It gives this error while debugging and Continue on Error is not enabled from Debug ribbon menu.

Also I would like to advise to use Check App State as it’s modern approach.

Thanks,
Ashok :slight_smile:

Ideally it should be resolved by replacing with check app state or by changing the selector of parent app block. Try to avoid selecting continues on error, use this only if there is no other option at all.
You can try to find element by image exist block and if image exist it should go ahead
Or try with pick branch some Alternet block and activities like this

@Aditi0374

as per the activity you used the behaviour is correct…check element is not to check if it exists but to check if it is enabled or disabled

to check for existence use check app state or element exists activities…they would give true or false based on existence

cheers

Hi @Aditi0374

You can try to do the same as mentioned in the Possible Solutions. Try to indicate 30-40 seconds of delay in it and try .
Hope it helps .

Hello @Anil_G i am using the activity check element inside “use application” activity as described by you but still it is getting that same error as i described in my above question.

I have used this point "Check Continue on error propery in properties panel " in my activity check element and its working .

Thank you so much

@Aditi0374

Glad it helped. Can you please mark it as solution to close the thread.

Regards,

@Aditi0374

I was talking about the first like it will check for enabled or disabled means the assumption for activity is that the control is present

So you need to use check app state activity which checks if a control exists or not

Cheers