Posts: 26
Threads: 8
Joined: Jun 2009
Reputation:
0
08-14-2009, 09:20 PM
I am working on a web app. I want to be able to check if on page load up at any time there is an error on the page, if some webparts dont load up successfully the sites displayes "Error"!! in their location. is there a way i can check for the string "error" anytime i am on a page?
Thanks
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
08-15-2009, 12:59 PM
a screen shot of the page with error will help. also if you can provide a snap of the spy on the object which contains the error string
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
08-17-2009, 12:21 PM
As you mentioned, if you are sure that a "Error" string is displayed whenever webparts dont load then you can simply add that image or webelement or whatever the string is and do this,
Code:
If object().Exist(2) Then
Reporter.reportevent micfail, "Error on Page", "Webpart hasnt loaded"
Else
Reporter.reportevent micpass, "Error on Page", "Webpart has loaded"
End If
Or on a sideline you can check for the browser status message or the page message, Sometimes when the page does not get completely loaded then the browser sends out a status message that "Error on Page".
Let me know if it helps.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 516
Threads: 17
Joined: Jul 2009
Reputation:
3
08-17-2009, 12:28 PM
Hi laura,
You can check the page status by validating the text displayed in the "WinStatusBar" displayed. The general status are "Done,Done, but with errors on page,Error on Page,Error" you can use a conditional loop to check this.
Let me know if you need any more info.
Thanks,
SUpputuri