Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script not getting title in IE
#2
Not Solved
Demonstration: AddUsingTitle

As stated earlier, this method will store any browser with the provided title.
Code:
SystemUtil.Run "iexplore.exe", "http://newtours.demoaut.com", "", "", 3 : Wait(4)
'Add the above open browser using its title
BrowserObject.AddUsingTitle "DemoAUT", ".*Mercury Tours.*"

SystemUtil.Run "iexplore.exe", "http://google.com", "", "", 3 : Wait(4)
'Add the above open browser using its title
BrowserObject.AddUsingTitle "Google", ".*Google.*"

'Use the names we gave the browser, and use the same name regardless of changes in its properties
With BrowserObject.Name("DemoAUT")
    .WebEdit("name:=userName").Set "test"
    .WebEdit("name:=password").Set "test"
    .Image("name:=login").Click
    .Sync

    If .WebList("name:=fromPort").Exist(10) Then
        .WebList("name:=fromPort").Select "Frankfurt"
        .WebList("name:=fromMonth").Select "December"
        .WebList("name:=toPort").Select "Paris"
        .WebList("name:=toMonth").Select "December"
        .WebRadioGroup("name:=servClass").Select "#1"
        .WebList("name:=airline").Select "Unified Airlines"
        .Image("name:=findFlights").Click
    End If
End with

'Use the names we gave the browser, and use the same name regardless of changes in its properties
With BrowserObject.Name("Google")
    .Link("text:=Gmail", "index:=0").Click
    .Link("text:=+You", "index:=0").Click
    .Link("text:=Images", "index:=0").Click
End with

With BrowserObject
    .Name("DemoAUT").Close
    .Name("Google").Close
End with

'Release
BrowserObject.Destroy
Reply


Messages In This Thread
Script not getting title in IE - by UFT_Newbie - 09-18-2014, 08:41 PM
RE: Script not getting title in IE - by vinod123 - 09-25-2014, 10:16 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to use GetRoProperty for title svsaug6 2 9,616 08-26-2013, 03:36 AM
Last Post: Novemberrain81
  Retreive Title for an Already Open Browser coasterdad1971 1 2,435 06-11-2008, 09:08 PM
Last Post: ramu

Forum Jump:


Users browsing this thread: 2 Guest(s)