Descriptive Program to Execute DOS Commands

How to run dir, cls time msconfig, scandisk etc commands by using QTP Descriptive Program

Questions by jkrishna83

Showing Answers 1 - 3 of 3 Answers

akothuru

  • Mar 6th, 2009
 

We can execute DOS commands from QTP.

SystemUtil.Run "cmd"
Window("nativeclass:=ConsoleWindowClass").Type "cd.."
Window("nativeclass:=ConsoleWindowClass").Type micReturn

Similarly you can exexute your own commands.
Window("nativeclass:=ConsoleWindowClass").Type "your own command"
Window("nativeclass:=ConsoleWindowClass").Type micReturn

  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