How does the function IsValid of UiElement work?

Hi all,

I just try on used the WaitUiElementVanish. But I have some concerns about the behavior of that activity. My used case is like the image below:

my test case is:
case 1: I try to input the not found of the on the activity WaitUiElementVanish and run it, it will run WaitUiElementVanish done and run popup the message box
case 2: I try to input the element found on the UI and run it. It will wait on the WaitUiElementVanish because the element is still there. I will try to the remove element by inspecting the element of the browser and deleting that element. My expectation is it will complete the WaitUiElementVanish activity and popup the message box, But it is NOT, it will wait on the activity WaitUiElementVanish.

So I try to generate the codebase to attach debug on the source code. on all case 1 and case 2 it will throw the same exception with the Uielement not found, But when the check on the line 139 case 1 is break but case 2 is not break.

But inside the UiElement I can’t debug inside.
My concern is what is the function of the IsValid() working and what differences between case 1 and case 2


1 Like

Hey @thinhnguyenhung

To which code you are referring here please ?


Hi @thinhnguyenhung
maybe this answer here will help?

hi @jack.chan , after reading that I understand some cached inside of the core uipath to improve the performance of it. So Do you know any setting that can disable caching? Thanks