Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script not getting title in IE
#1
Not Solved
Hi Guys,
I need to run my script in IE, Chrome and FF. My script works fine in Chrome and FF but not in IE. In IE, i'm getting the url of the page instead of title. Below is the code:

Code:
Browser("ABC").Page("XYZ").Link("link").Click
Title = "ABCDEFG"
Title = Browser("CreationTime:=1").GetROProperty("title")

If Title  = Title Then
    msgbox "Pass"
Else
    msgbox "Fail"
End If

Can someone help me out with this issue.
Reply
#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


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

Forum Jump:


Users browsing this thread: 1 Guest(s)