Add the ability to detect and fail fast when unexpected pages (e.g. 500 error) are encountered #70

Closed
geb-bot opened this Issue Apr 13, 2011 · 5 comments

Projects

None yet

2 participants

@geb-bot
geb-bot commented Apr 13, 2011

Originally created by Luke Daley.

@geb-bot
geb-bot commented Jan 21, 2012

Originally posted by Alexander Zolotov.

Why? Error-pages are usually primitive, so the test will not much accelerated if it fails immediately when getting 500 response code. However, in some of my projects it makes sense to validate error-pages (for example check that stacktrace do not displayed for regular users) and this innovation will not let me do this test.

@geb-bot
geb-bot commented Mar 20, 2012

Originally posted by Christoph Neuroth.

Also this might currently be impossible because WebDriver does not expose any HTTP things, see http://code.google.com/p/selenium/issues/detail?id=141

@geb-bot
geb-bot commented Mar 21, 2012

Originally posted by Luke Daley.

It would be nice in a test to have a nice error message to indicate that you ended up at your application's error page instead of getting a less descriptive RequiredPageContentNotFound exception.

If the error message clearly says that you're at the error page, you'd know immediately that the test failed because the system under test error'd.

I imagine it would work something like this�

class ErrorPage extends Page {
  static at = { title == "Error" }
}

browser.expectNeverAt ErrorPage

Then whenever we change the page, Geb would implicitly check we are not at that page.

@geb-bot
geb-bot commented Sep 12, 2013

Originally posted by Marcin Erdmann.

Fixed inhttps://github.com/geb/geb/commit/17043b8adc390c7f616e77fb50d6387ba56eebb8

@geb-bot
geb-bot commented Oct 19, 2013

Resolved

@geb-bot geb-bot added the New feature label Apr 12, 2015
@erdi erdi was assigned by geb-bot Apr 12, 2015
@geb-bot geb-bot added this to the 0.9.2 milestone Apr 12, 2015
@geb-bot geb-bot closed this Apr 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment