what r the send key commands in QTP why they r used
Answer Posted / pradeep.yaksiri
Sendkeys method is like boon for QTP testers, In some cases
QTP tool becomes dumb and not able to identify or record the
windows based application, In that case rather than not
doing anything we can still automate it using sendkeys
method. You can send any character to application to perform
specific action i.e If you want to close the notepad then
you can do it by sending,
1. ALT+F and
2. X.
Or
only ALT+F4
In QTP how can we perform this action? Let's take one simple
and practical example.
Following is the simple example which perform closing
notepad action using sendkeys method in qtp.
==============================
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "%f"
wait 3
WshShell.SendKeys "x"
wait 3
Set WshShell = Nothing
==============================
OR
==============================
Set WshShell = CreateObject("WScript.Shell")
wait 2
WshShell.SendKeys "%{F4}"
wait 3
Set WshShell = Nothing
==============================
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
diff between qtp versions from 8.5
Your roles and responsibilities and daily tasks? (As automation tester)
Can we Test Welcome Screens and Process Images with QTP
How to Upgrade or support firefox 2.0 version on QTP 9.0? I have installed QTP 9.0 and installed firefox 2.0. But in REcord and Run Settings, it shows firefox 1.5 in Web tab for browser selection.
how to download mercury qtp9.2 ny internet ?
How many types of recording modes in qtp? Which will be used when?
How to save your test using quicktest professional (qtp)?
Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.
How to handle the exceptions using recovery secnario manager in quicktest professional?
Differences between quicktest professional (qtp) and winrunner?
How does qtp identify the object in the application?
How can you give wait up to 10 seconds in qtp?
Explain the terms test and business component?
What are the different attribute used with regular expression?
How is recording done when a application is over lapping the QTP application it gives a message object not recorded