I have below sample code for my wpf app. I need to fill in text fields of form with strings.
Run('AutoItWpfTesting.exe')
WinWaitActive("Window1", "")
$hHwnd = WinGetHandle("Window1")
MsgBox(0, "Message", $hHwnd)
$returnVal1=ControlGetHandle ( "$hHwnd", "", "[NAME:txtVersion]")
$returnVal2=ControlSend($hHwnd,"","[NAME:txtVersion]","blahblah")
MsgBox(0, "Message", $returnVal2)
it returns 0 for $returnVal2 and Empty string for $returnValue1. However this works fine for my sample winform application.
Any clues why this behaviour is..and Any tweaks available to get exact text-box to auto fill data for wpfa app.
WPF applications do not use Windows' controls and handles for the controls. You can see that by using Spy++. WPF Alternatives for Spy++
If you want to automate WPF applications you will need another tool or use the UI Automation API to build one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With