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
Why to use descriptive programming?
how to know no.of mails in our g mail by using vb-script
How extensive or customized are the server logging and reporting requirements; are they considered an integral part of the system and do they require testing?
Explain about business process component? types and usage?
how to post xml data from QTP scripts to any application?
What are the different attributes used with regular expression?
can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks
what testplan contents and what test strategy contents,what is the diff b/w them
Is it possible to call from one action to another action in qtp?
Can you write a script to check if the folder exists or not?
Explain how Selenium is different from UFT?
What are the types of data tables in qtp?
What is the Difference between test object and run time object?
how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief
How you can find length of array in qtp?