WPF controls have delays in getting fully loaded

0 Answers 3 Views
Actions Elements Verification
Jay
Top achievements
Rank 1
Jay asked on 20 May 2025, 05:44 AM

Hi, 

I am finding my WPF elements using `Find.AllByExpression`, and I am retrieving the WPF elements with no issues.

But when I try to interact with them, I am having some issues. Some examples here: 

1. The buttons (found/retrieved as FrameworkElement and cast as Button) are enabled and visible but not clickable. I did try using Telerik's `EnsureClickable()`, but it didn't make a difference. This was only fixed by a hard-coded delay. 

2. The textbox (found/retrieved as FrameworkElement and cast as TextBox) is visible and I can enter text in it, but it seems that I can enter text even before the XAML triggers/handlers are loaded. This results in XAML triggers not responding to the textbox enter events. 

 

So it seems that WPF controls need some time to be fully loaded, ready for automation actions. 

And I can't find a way to check or wait until the controls are fully loaded. 

Is this a known issue?

How can I fix or work around this?

 

Thank you.

Kind regards,

Jay

No answers yet. Maybe you can help?

Tags
Actions Elements Verification
Asked by
Jay
Top achievements
Rank 1
Share this question
or