How can we use the "CreateObject("Wscript.Shell")" in QTP
and what is the definition and purpose of it?
Answers were Sorted based on User's Feedback
If we want to work on operating system related functions
(like command prompt,windows registry....) then we go
for "Wscript.Shell".Actually this is vbScript class. WE can
not directly use this in qtp. For that one we need to
create one instance firstofall. Using CreateObject we can
create instance as followes.
Set oShell=CreateObject("Wscript.Shell")
oSehll.popup "Have a great day"
oShell.Run "cmd /k dir"
oShell.sendkeys "{ENTER}"
set oShell=Nothig
I hope this may useful.
Regard,
mahi.kotike@gmail.com
| Is This Answer Correct ? | 29 Yes | 2 No |
Answer / hemakumar.m
For perfoming keyboard operations "Wscript" is use full.
Eg:For Pressing "F5"
Set Object=CreateObject("Wscript.Shell")
Object.SendKeys "{F5}"
U can find this in qtp help.
| Is This Answer Correct ? | 10 Yes | 4 No |
what is KEYWORD DRIVEN TESTING ? I M NOT ASKIN WHAT IS KEY WORD VIEW PLZ ANS FOR ONLY WHAT IS KEYWORD DRIVEN TESTING EXACTLY THANX
When The Low Level Recording is Used in QTP
what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”
How can we record an edit box in the Web application ?
How to find given string is palindrome or not without using strreverse() function?
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))
Can QTP be used for GUI testing ?, We are using Java with MySQL and Operating system is Linux. We are NOT using the web.
For what purpose to we use object repository in a application?also explain usage of obj.repository?
I want to assign values in a table in my software, in first column i will give values, table is of 4x4 i.e 4 row and 4 columns, i m using VBScript in my automation work. it is a simple table for giving values.
What r the different filters in defect in quality center
Explain synchronization types in QTP
Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain