Share
Go down
jayz123
Posts : 8
Join date : 2012-11-14

How to replace the Original Error message?

on Wed Nov 14, 2012 8:50 am
As title above stated, I have a program working on Selenium RC based on selecting the Url from the ComboBox.
If i click the button "Start" without selecting the Url, there is an error message will prompting up show "Unhandled exception has occurred in your application....... .... Object reference not set to an instance of an object"

I could proceed my test by clicking the Continue, but i wish to replace this error message with my own error message something like "Please select the Url...etc", I tried with MessageBox method but it seem like former message cannot be replace. Anyway how to do this? Thank you
avatar
Advisor
------------------------
------------------------
Posts : 383
Join date : 2009-07-30
Location : India
http://seleniumforum.forumotion.net

Re: How to replace the Original Error message?

on Sun Nov 18, 2012 12:49 am
you can try catch the error message and return the message you want if that error message encounter

ex:

if (error_msg appear)
return "modified error message"
else
return "no error messages appear"

you can work out with something like this with the help of programming language . Hope this will help.

best of luck.

_________________
Spread Your Knowledge About Selenium Tool.

Administrator
Email: selenium.discussion.thread@live.com
Forum: http://seleniumforum.forumotion.net
jayz123
Posts : 8
Join date : 2012-11-14

Re: How to replace the Original Error message?

on Mon Nov 19, 2012 11:21 am
ya... thank you very much.. i go too far from the simplest way... ^^
Sponsored content

Re: How to replace the Original Error message?

Back to top
Permissions in this forum:
You cannot reply to topics in this forum