Hi,Can anyone tell me how to run QTP scripts at DOS prompt?

Questions by vasavi   answers by vasavi

Showing Answers 1 - 9 of 9 Answers

saranya

  • Dec 20th, 2006
 

Here is the answer for how to run DOS command in QTP..Hope this will be useful fro you.

You can run standard DOS commands in your QuickTest test using the

VBScript Windows Scripting Host Shell object (WSCript.shell). For example,

you can open a DOS command window, change the path to C:, and

execute the DIR command using the following statements:

Dim oShell

Set oShell = CreateObject ("WSCript.shell")

oShell.run "cmd /K CD C: & Dir"

Set oShell = Nothing

For more information, refer to the Microsoft VBScript Language Reference

(choose Help > QuickTest Professional Help > VBScript Reference >

VBScript).

rosy

  • Jan 2nd, 2007
 

hello everyne,

i m using the window object in qtp and i want to pass the window name as an argument which is stored in a variable.

like:

window("arg1").window("button").close

i m unable to write a syntax for passing arg1(window name) in the code in QTP.

i shall be greatful if somebody could help me in this regard.

thanks,

rosy

  Was this answer useful?  Yes

K.R.Kishor

  • Jan 15th, 2007
 

Try This,

arg1="my window"

window(arg1).winbutton("ok").click

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions