Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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


Copy link

geb-bot commented Apr 13, 2011

Originally created by Luke Daley.

Copy link

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.

Copy link

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

Copy link

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.

Copy link

geb-bot commented Sep 12, 2013

Originally posted by Marcin Erdmann.

Fixed in

Copy link

geb-bot commented Oct 19, 2013


@geb-bot geb-bot added this to the 0.9.2 milestone Apr 12, 2015
@geb-bot geb-bot closed this as completed Apr 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants