Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Validating Browser Name thru QTP
#1
Solved: 11 Years, 4 Months ago
Hi,
I am new to QTP and I need some help. I am trying to create a script that validates the Browser title of a website. When I go to different applications the Browser title keeps changing and I need to validate the change.

My question is how do I get the browser title. When I do an object spy I get the title of the browser but I want help with the code that I should right to validate the browser title.

Thanks in advance for the help
Reply
#2
Solved: 11 Years, 4 Months ago
Hi,

You can try doing following.

Code:
Browser("title:=Yahoo.*").Page("title:=Yahoo.*").webedit(..).click()
If you have 3 different browsers you can have the browser name starting from and use regular expression.
You should some thing called as expected result
Reply
#3
Solved: 11 Years, 4 Months ago
Hi,

Using GetROProperty we can get the runtime properties for any object.

If you are working with only one browser on your desktop then we can use the following code to get the Title

Code:
BrowserName=Browser("micclass:=Browser").GetROProperty("name")
PageName=Browser("micclass:=Browser").Page("micclass:=Page").GetROProperty("title")

Title ="xxxxx"

validate the BrowserName with the variable 'Title' that you have

Thanks,
Vijay
Reply
#4
Solved: 11 Years, 4 Months ago
You suggestion was very useful. Appreciate the help that this forum provides to people like me Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sending json file request and validating response in soap UI tool using Groovy script smiley 0 3,880 07-19-2017, 04:58 PM
Last Post: smiley
  error object disabled on line 9 where it says " Browser("Browser").CloseAllTabs" kp_usa 1 3,344 12-20-2012, 12:20 AM
Last Post: adityapant27
  Validating XML from browser request flexdev 0 1,501 04-13-2012, 09:07 PM
Last Post: flexdev
  My IE Browser Recognizing as Window instead of Browser. sivakrishna 4 9,097 02-11-2012, 12:19 AM
Last Post: ravi.gajul
  Clicking an item in the context menu opens up browser(IE6) but in same browser of QC pjavvaru 2 4,389 04-10-2010, 02:16 AM
Last Post: jsknight1969

Forum Jump:


Users browsing this thread: 2 Guest(s)