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

What are the technics follow in writing VB script?

1914


If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?

1955


When do go for loop condition in test?

1039


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?

970


How does qtp identify gui object?

952


Shall we add Local Repository to shared object repository,if yes,how we add

7324


what are the frame work models of qtp?which frame work you follow in your company?and explain it process?

2488


What is object spy in quicktest professional?

1038


What Folder Structure following in Keyword Driven Frame work?

2716


What is quick test pro? What is a quick test professional?

1014


what is output value in QTP and how it can be used in automation testing

1917


How will you check a web application for broken links using qtp?

969


How to sendKeys in QTP? Diff b/w sendkeys and device replay? Diff b/w function and Sub? Diff b/w Array and List Different Types of running Keys other than Fast, slow,Normal mode Regular expression for http://newtours.demoaut.com Difference between \w and \W How to generate script button Recording Types Different Types of Actions? Using DP performance degrades, If Yes why? How to close all the opened browsers? Diff b/w SystemUtil.Run and invoke application? If qtp not recognized the combo box How to select values from drop down?

3987


Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations

2130


What is test object model in quicktest professional (qtp)?

946