Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

How to replace the Original Error message? Empty How to replace the Original Error message?

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
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

How to replace the Original Error message? Empty Re: How to replace the Original Error message?

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.
avatar
jayz123
Posts : 8
Join date : 2012-11-14

How to replace the Original Error message? Empty Re: How to replace the Original Error message?

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

How to replace the Original Error message? Empty Re: How to replace the Original Error message?

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