Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why to use descriptive programming?

992


how to know no.of mails in our g mail by using vb-script

2206


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?

1021


Explain about business process component? types and usage?

2037


how to post xml data from QTP scripts to any application?

1961


What are the different attributes used with regular expression?

1006


can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks

2087


what testplan contents and what test strategy contents,what is the diff b/w them

2152


Is it possible to call from one action to another action in qtp?

1010


Can you write a script to check if the folder exists or not?

971


Explain how Selenium is different from UFT?

1242


What are the types of data tables in qtp?

996


What is the Difference between test object and run time object?

1193


how we implement share object repository in QTP 9.0 without using quality Centre , Explaine in brief

2124


How you can find length of array in qtp?

999