Sometimes we need to check whether any particular application is running or not, and if not, then run it.
In this post we are going to do that through QTP!!
Here we will check and run Internet Explorer, if not running already..
Dim flag, AllProcess, AppToRun
AppToRun = “iexplore.exe”
Flag = Flase
Set AllProcess = GetObject(“winmgmts:”)
For Each Process In AllProcess.InstancesOf(“Win32_process”)
If (Instr ((Process.Name), AppToRun) = 1) Then
Print “Internet Explorer is running..”
Flag = Ture
Exit For
End If
Next
If Flag = Flase Then
Print “Internet Explorer not is running..”
SystemUtil.Run AppToRun
End If
You can do the same for any process/application. You just need to change the value of AppToRun variable. 🙂
Well said with script.
QTPbook
hi friends,
This is very helpful.Thanks u..
These kind of post are always inspiring and I prefer to read quality content so I happy to find many good point here in the post writing is simply great thank you for the post.Plagiarism detection software
It is very rare these days to find blogs that provide information someone is looking for. I am glad to see that your blog share valued information that can help to many readers. Thanks and keep writing!
free cell phone
Hi , i got one scenario . the script line states as Browser("").page("").webtable("").webtable("").webelement("").set/click/GETROProperty…
here above case , the webtable names (any one in the flow ,in some cases two ) changed as dynamically like date and time (Ex: 14/05/2013 10:10)and some times 6digit number (any number)in another case
so ,like this changing the webtable names , how can capture names and properties .and how to manage the Object repository for parameterising the above script ?
or if it is descriptive how to manage ?
and if Regular Expressions then can you give me in detailed ,please waiting for help !!!
Thank you.