aralele
aralele

Reputation: 63

Hidden control at Coded UI

I am trying to record coded UI for a WPF application. My goal ls to click on button (Mybutton).

The problem is that in the application there is another control which in not visible and it lays on top of my button. Each time i'm clicking myButton - the code which the CUIT generates is for the blockingControl.

I have the app code - but have no permissions to change the xaml (I can add my own implementation such "onCrerationAutomationPeer").

Is there a way to write a plug in which will know to recognize that the BlockingCcontrol is not visible - and will not choose it?

Upvotes: 0

Views: 2175

Answers (2)

aralele
aralele

Reputation: 63

I have figured out that if I implement onCrerationAutomationPeer to return null the blocking control will be ignored.

Upvotes: 1

Damaor
Damaor

Reputation: 39

In WPF you can also ask if the button is enabled.

if(button.GetProperty("Enabled").Equals(true)) { ... }

Upvotes: 0

Related Questions