Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Recognize that Browser returns an Error page after hitting a URL with QTP ?
#7
Not Solved
Hi.

It depends on how you're invoking the URL.

If you're using the "InternetExplorer.Application" approach, then your task becomes very easy. Follow the code below:

Set objIE = WScript. CreateObject("InternetExplorer.Application", "objIE_")

By using this, you've attached a name to the IE object.


Now, you invoke the URL. Also define a Sub like so:

Code:
Sub objIE_NavigateError(pDisp, URL, TargetFrameName, StatusCode, Cancel)
' in case there's been an error, for example, 404 Not Found, then the control would 'reach this place.
MsgBox. "Error: " & StatusCode
End Sub

Let me know if this helped.
Reply


Messages In This Thread
RE: How to Recognize that Browser returns an Error page after hitting a URL with QTP ? - by Light - 07-01-2011, 07:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SendKeys changing focus to IE url when executed from framework psova 0 2,142 06-09-2015, 07:19 PM
Last Post: psova
  How to get URL/Location from Address bar of any open window in Windows 7 kalpmist 0 4,332 05-11-2015, 07:23 PM
Last Post: kalpmist
  Does QTP recognize C++ Objects? Babita01 0 3,543 05-15-2012, 03:09 PM
Last Post: Babita01
  QTP doesnot recognize Java objects. Babita01 0 3,910 05-15-2012, 11:41 AM
Last Post: Babita01
  JBoss error mask upon returning to page from a popup Anuroop 1 2,096 03-15-2012, 05:40 PM
Last Post: Anuroop

Forum Jump:


Users browsing this thread: 4 Guest(s)