UIElement is no longer Valid error when trying to click a checkbox

Hello Everyone,

So i am trying to automate a scenario where in I need to select a checkbox next to a desired text which changes with every run.

On trying to automate,the selector for that radio button is showing “UIElement is no longer Valid” error.So basically i cant find out selector for that radio button through normal means.

So i tried with Anchor base,as shown below.The issue in this case is that the click doesnt work at all.No exceptions are thrown either

The last thing i tried was to record Image based automation.In this case the click image was recorded but it used offset information and so i cant use this with respect to my desired text as this always was clicking at a particular point and not with respect to anything.

So I need your suggestions on how to make this work.I need to click a radio button with respect to my desired text.

Thank u in advance.


hi @Vidya_Srinivasan,

Have you tried CV Click .


1 Like

@Vidya_Srinivasan Does Clicking on the Desired Text Select the Checkbox ?

Yes it does,its only with UI path that i am finding it hard to click.
Manually i am able to click

@Vidya_Srinivasan If Clicking on the Desired text will let you Check it’s Checkbox, then use a Click Activity on the Desired Text instead of the Checkbox. If it Works, we’ll need to Check it’s Selectors and modify it accordingly using UiExplorer.

My team at this point wants to see if we can manage without computer vision.
Last resort as of now.But will try.Thank you.

Clicking on desired text,open the hyperlink beneath that text.It doesnt check the checkbox.
Only checking on that box will check the checkbox

@Vidya_Srinivasan Are you sure there exists no Selector for the Checkbox, Have your tried to Indicate the element using UiExplorer, Also there is a Check Activity , Have you tried it ?

1 Like

Hi,When i try to get the selector for that checkbox,i get the error mentioned below:
UIElement is no longer Valid.

What is the version of your Studio and the UIAutomation activity package?

Quick fix is sometimes to simply update the UIAutomation package to the latest version (as this is the package that is responsible for the UI interactions within Studio).

Also, does the line get selected on a mouse click? I noticed that you have the ability to grab the selector for the text. It might be possible to still use that to i.e. to first click the text and then Send Hotkey SPACE to select the checkbox. This is tricky though, because best practice would be to then check if the field was correctly selected (and for that you would want a selector)

Another workaround would be to set the Click activity on the text, but provide it with a CursorPosition offset to to offset the click to the left to actually click on the checkbox.



Thank you for those pointers.It really helped.
I used image based click for that checkbox.And then it was showing that selector on basis of row number.

I extracted the row number of that desired text and used it as a dynamic variable in my selector.That helped get over this issue.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.