Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to check if correct page/Browser is opened
#1
Not Solved
How can I check if the correct web page or browser is opened , when i click a link or a web button. Is there any procedure for this?

I'm trying this way
Code:
Link1Name = "Link1"
Link1Url = "http://www.link.com/Link1"

If browser().page().Link("Name:="&Link1Name&",url:="&Link1Url).Exist Then
Report Pass
Else
Report Fail

but , I doubt the performance of the script especially when there are too many links to be checked. I feel error check at very single link would take lots of time to run the script.
Reply
#2
Not Solved
I tried it using "Insert textCheckpoints" and captured the text that should appear on the expected link into datatable. so when I view results I can see if the captured text relates to the link or not.
I'm new to web testing, i donno if this is a feasible solution. correct me if this is wrong.
Reply
#3
Not Solved
U can use this:
Code:
If  Browser(oBrowser).Page(oPage).WebElement("html tag:=DIV","innertext:=SelectFlight").Exist Then
          Call WriteCheckpointResult(2,"Verification Of Page","page exists","Pass")
      Else
         Call WriteCheckpointResult(2,"Verification Of Page","page does not exists","Fail")
     End If
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Very Slow Response time of WpfApp when QTP is opened. krr 1 3,417 11-23-2011, 09:06 AM
Last Post: sowmya
  How to Recognize that Browser returns an Error page after hitting a URL with QTP ? Sukhvinder 7 6,515 07-09-2011, 11:11 AM
Last Post: rajpes
  2 process opened for ie help priya999 5 5,220 02-25-2011, 03:35 PM
Last Post: basanth27
  New browser/page for each new object added in OR ritugoyal 1 2,458 12-15-2009, 06:17 PM
Last Post: Ankur
  unable to add objects of 3rd succesively opened window to Object Repository abhaya_147 2 3,068 10-20-2009, 04:09 PM
Last Post: abhaya_147

Forum Jump:


Users browsing this thread: 1 Guest(s)