Write a Fucntion to close all Opened browser expect desired
one?
Answers were Sorted based on User's Feedback
Answer / sojan davis
Function WebLogOff()
Dim oDesc, x
'Create a description object
Set oDesc = Description.Create
oDesc( "micclass" ).Value = "Browser"
'Close all browsers except ""
If Desktop.ChildObjects(oDesc).Count > 0 Then
For x = Desktop.ChildObjects(oDesc).Count - 1 To 0
Step -1
If InStr(1, Browser("creationtime:="&
x).GetROProperty("name"), "NAME OF PAGE") = 0 Then
Browser( "creationtime:=" & x ).Close
End If
Next
End If
End Function
| Is This Answer Correct ? | 3 Yes | 0 No |
How to map test cases with Automation script? Please explain in details.With example Thanks for your co-operation(In Advance)
what is fire event method in qtp?
how to check whether link is disabled in QTP??
HOW TO OPEN NEW TAB USING VB SCRIPT IN QTP?
i have to open a notepad having no. of words in dat file by recording in qtp and then find a particular word and display true or false
How to open excel in vb script?
write a vb script to display ***** ***** ***** ***** *****
How will you convert a string to upper case string using vbscript?
Can automation testing find ssame no. of bugs what we can find by manual testing?
1. How do declare public variable in vb scripts?
Why is the use of exit do or exit for statements within loops discouraged?
i created script for login in QTP,i parametirized that using global sheet,problem i am facing is first i want to login with first values provided in excelsheet and want to perform some operation,second time if call same action it should login with second values in excelsheet