Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - What is difference between SystemUtil.Run and invoke application?




429
views
asked marvit August 23, 2014 01:05 AM  

What is difference between SystemUtil.Run and invoke application?


           

1 Answers



 
answered By Dharma   0  
 Difference Between InvokeApplication and SystemUtil.Run
1. SystemUtil.Run can open the Desktop applications or System Applications without need to specify the full path for system applications.Other thatn this It can open any application provided the full path of the application. It can open non-executable file and executable files.
This will be generated with Recording option while the application is selected from Start Menu।
object.Run file, [params], [dir], [op], [mode]
ex:
SystemUtil.Run "iexplore.exe","http://www.testinautomationskills.blogspot.com/" ,,,,
We can also close the process by using CloseProcessByName method.

2. The InvokeApplication statement is supported primarily for backward compatibility. .It can open executable files only.
ex:
invokeapplication "C:\Program Files\Internet Explorer\iexplore.exe"
or
invokeapplication "\Program Files\Internet Explorer\iexplore.exe","C:"


3.alternatively we can also use the following..
Set objshell = createobject("wscript.shell")
objshell.run "notepad.exe"
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert