Micro Focus QTP (UFT) Forums

Full Version: [UFT] Change property of object (WpfButton)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
in my test I have a WpfButton where "enabled" property is setted to "false".

How can I change this property?

I have to try with "SetToProperty" but it not works.

Thanks for the support.
I found a workaround.

I used this code:
Code:
WpfWindow("myApp").WpfEdit("txtComments").Set ""

Set WshShell = CreateObject("WScript.Shell")
wait 2
WshShell.SendKeys "{TAB}"
wait 1
WshShell.SendKeys "{TAB}"
wait 1
WshShell.SendKeys "{ENTER}"

I set the focus in a WpfEdit, I pressed two times the tabs button for move the focus in APPLY button, then I pressed ENTER.

Maybe someone helpful to someone.

Thanks a lot.
Thanks for the question and eventual solution.
Kindly edit your first post to elaborate more on the question. Why were you trying to change the property?