Hi Shilpa,
You can get the values from user dynamically in run-time.
Please see the below example:
Dim a, b
a = Inputbox("Enter 1st number:")
b = Inputbox("Enter 2nd number:")
'Now we can set the values from the variable "a" in the WpfEdit
WpfWindow("title").WpfEdit("title").Set a
I hope this would help.
Regards
Amit Raj
On Tuesday, 4 September 2012 12:18:45 UTC+5:30, shilpa gupta wrote:
>
> Hi,
> In a window based application, i have a textbox. i want to enter a value
> (for e.g. 5) in the text box using keyboard input, but the below code is
> not working, pls suggest what is the error
> WpfWindow("title").WpfEdit("title").Click
> WpfWindow("title").WpfEdit("title").Type "5"
> erorr shown is Unable to cast object of type
> 'ActiproSoftware.Windows.Controls.Editors.Int32EditBox' to type
> 'ActiproSoftware.Windows.Controls.Editors.Parts.Primitives.TypeSpecificPartBase`1[System.Nullable`1[System.Int32]]'.
>
> also tried using sendkeys, but it is also not working
> Set WshShell = CreateObject("WScript.Shell")
> WpfWindow("title").WpfEdit("title").Click
> wait(3)
> WshShell.SendKeys ("5")
> wait(2)
> Regards
> Shilpa
>
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en