Micro Focus QTP (UFT) Forums
Retreive Title for an Already Open Browser - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Retreive Title for an Already Open Browser (/Thread-Retreive-Title-for-an-Already-Open-Browser)



Retreive Title for an Already Open Browser - coasterdad1971 - 01-28-2008

I have an application that when I enter info into one web browser another autiomatically opens. Its title also changes depending on its status. I have tried the datatable to parameterize this but its too painful and time consuming to do because we want to use different servers with the script. So I want to once the window is open, retreive the title property in a descriptive way? Does anyone know how to do this?


RE: Retreive Title for an Already Open Browser - ramu - 06-11-2008

Use the following code inorder solve your problem.
it will give you all the browsers titles one by one opened in the desktop

Code:
Set Titles=description.Create()
Titles("micclass").value="Browser"
Set Brows=Desktop.childobjects(Titles)
NoOfBrowsers=Brows.Count
for i=0 to NoOfBrowsers-1
TitleofBrowser=Browser("creationtime:="&i).GetRoProperty("title")
msgbox TitleOfBrowser
next


Regards

Ramu