Wednesday, May 13, 2009

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"

No comments:

Post a Comment