write a script to close all open browser in qtp except one
browser whose name is xyz
Answer Posted / lak
dim oBrowser,oAllBrowser,nProcessId,nCounter
set oBrowser = Description.Create
oBrowser("micclass").vlaue="Browser"
set oAllBrowser = Desktop.childObjects(oBrowser)
for nCounter=0 to oAllBrowser.count-1
if(instr(oAllBrowser(nCounter).getRoProperty
("title"),"xyz"))<=0 then
nProcessId = oAllBrowser(nCounter).getRoProperty("process
id")
Systemutil.closeProcessById nProcessId
End if
else
oAllBrowser(nCounter).close
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is meant by Output Value in UFT?
How do you synchronization point through DP?
If I give some thousand tests to execute in two days what do you do?
how to convert 100 into hundred repees only and viceversa
What are the types of properties that quick test learns while recording?
Dear All , For UFT 12.02 which version QC or ALM will support ? Thanks Balaji
Is it possible to use two instances of UFT on the same machine? If not why?
Discuss the QTP Environment?
What is the architecture of your project? Can any one answer for this question plz........
what is profile tool?
In qtp, how you can remove the spaces from string?
I have some real time based question.. 1.what are the challenges you have faced in your current project. 2.what are the bugs you found in your current project. 3.what are the strategies you follow to convert manual test cases into automation test cases. 4.how QTP identify two different browsers. 5. When you create a function library and share object repository what are the problems you have faced 6. How to solve the tool tip problem 7.what are the interesting bug you have found in your current project. 8.what is your daily work as a automation test engg. 9. how to create a weekly status report. 10. how many test cases you write,review and execute per day. 11.what are the uses of SQL in automation. 12.How to retrieve the data in html through vb script. 13.If application is very slow how to test the application in qtp.
How to get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric
What are the different types of functions available in qtp and explain ?
If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?