Micro Focus QTP (UFT) Forums
[UFT] [WPF] Trigger on TextBox - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: [UFT] [WPF] Trigger on TextBox (/Thread-UFT-WPF-Trigger-on-TextBox)



[UFT] [WPF] Trigger on TextBox - robertosalemi - 05-16-2016

Hi,
in my WPF application I have a TextBox, when it is cleared, there is applied a style with red border.

In WPF this should be a Triggers, right?

Can I check if this trigger is shown or no?

I see the property Triggers that returns me a TriggerCollection, but the count of it is always 0 (in each condition).


RE: [UFT] [WPF] Trigger on TextBox - robertosalemi - 05-16-2016

I try with this code:
Code:
Set txtElem = WpfWindow("myApp").WpfEdit("ProcessCode")
Set objelem = txtElem.Object

'First test
Set triggerColl1 = objelem.Triggers
MsgBox triggerColl1.Count

'Second test
Set styleObj1 = objelem.Style
MsgBox styleObj1.Triggers

Set oo = styleObj1.Triggers
Msgbox oo.Count

In each case, count is equals to 0.

Why?


RE: [UFT] [WPF] Trigger on TextBox - robertosalemi - 05-26-2016

Any suggestions....?