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 kind of frame work you used in your last project?
When you open QTP, how many sheets you can see?
wht type of User defined functions or Java Releated functions do we write in VB scripting
How QA specialist can identify when programmatic descriptions are useful?
What is the difference in testing a client-server application and a web application?
how to evalute defects in QTP script?
How to recognise the webelement and verifying that webelement is enabled?
How do we analyze the checkpoint results?
How the smart identification is used in real time?Please explain with an example
Can we create user defined functions in qtp?
How to use descriptive programming?
What is throw object?
What are the challenges you faced during you entire life automation ?
Can any suggest me what is exposure testing?
assume i have few url link how will i dynamically call then using descriptive programming?