Share
Go down
cenbek
Posts : 2
Join date : 2012-12-11

give error if page is not exist

on Tue Dec 11, 2012 4:44 am
Hi.
i use asp.net mvc, and i try unit tests and behviour driven development tests.
i want to give error if a page doesn't exist.
For example, i use this code:
selenium.Navigate().GoToUrl(baseurl+"/Index");

i also deleted Index view. That is, no view/page at the "baseurl+"/Index" route.
In fact, there is no ─▒ndex page, bu my test gives success.
Thanks in advance.

tarun3kumar
Master
Master
Posts : 186
Join date : 2012-02-14
http://seleniumtests.com

Re: give error if page is not exist

on Wed Dec 12, 2012 1:14 am
Can you assert on the basis of content of page

_________________
Thanks
Tarun K
Free Selenium Training
cenbek
Posts : 2
Join date : 2012-12-11

Re: give error if page is not exist

on Wed Dec 12, 2012 4:02 pm
i can't understand what you said. Wht is the the basis of content of page.
i can't understand this?
Thanks.
tarun3kumar
Master
Master
Posts : 186
Join date : 2012-02-14
http://seleniumtests.com

Re: give error if page is not exist

on Sun Dec 16, 2012 1:57 am
Assert the absence of certain element /text on page

_________________
Thanks
Tarun K
Free Selenium Training
Sponsored content

Re: give error if page is not exist

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