Support navigating to page instances in addition to classes #310

geb-bot opened this Issue May 15, 2014 · 1 comment


None yet

2 participants

geb-bot commented May 15, 2014

Originally created by Luke Daley.

it should be possible to do:

class ProductPage extends Page {
  String productId

  ProductPage(String productId) {
    this.productId = productId 

  static at = { title == "Product '$productId'" }

to new ProductPage("myId")

After this change, to(SomePage) becomes just shorthand for to(new SomePage()).

We will have to add some formal kind of notion of initialised to Pages. Initialisation is performed by Geb (in Browser) which is where the backing navigator is attached to the Page instance.

If a user tries to use Geb functionality (e.g. Navigator method) on an uninitialised page they should get an appropriate error.

If they try to initialise an already initialised page they should get an appropriate error message (e.g. to(to(new SomePage())).

geb-bot commented Dec 15, 2014


@geb-bot geb-bot added the Improvement label Apr 12, 2015
@erdi erdi was assigned by geb-bot Apr 12, 2015
@geb-bot geb-bot added this to the 0.10.1 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