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
What are the technics follow in writing VB script?
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?
When do go for loop condition in test?
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?
How does qtp identify gui object?
Shall we add Local Repository to shared object repository,if yes,how we add
what are the frame work models of qtp?which frame work you follow in your company?and explain it process?
What is object spy in quicktest professional?
What Folder Structure following in Keyword Driven Frame work?
What is quick test pro? What is a quick test professional?
what is output value in QTP and how it can be used in automation testing
How will you check a web application for broken links using qtp?
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?
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
What is test object model in quicktest professional (qtp)?