Testing a Find Element that returns UiElement


I am facing a problem and I don’t know how to solve it. I can’t find anywhere about this.
I will use this example of notepad to be simpler. I want in a condition check if the menu behind is “clickable”, because there is another windows activated. I checked the “Find Element” an this has an option of WaitActive. The problem is that “Find Element”'s output is UiElement. How can I test it in a Decision?
Basically, I want it to check and alert the user that he needs to close the window to continue.


If you want to test UiElement you received is for the same element you want, better use highlight activity to highlight the element for testing pupose.


If your UiElement out var is foundElementvar, then try in IF
foundElementvar Nothing (means it did not find any element) or use Not Nothing.
Which ever suits you. :robot:

1 Like

You can use On element Appear with WaitActive property. Attached a sample workflowtest.xaml (7.3 KB)

Helo rajeev85! It worked as I wish! Just the part “Write Line” didn’t work

Hello nadim.warsi! It worked!!! Thanks a lot

1 Like

Good. But wondering why the WriteLine didn’t work…

No worries, the important thing is that it worked :slight_smile:

Great :slight_smile: