Screencast on navigational features of page-object

I’ve created yet another screencast. This one demonstrates how to use the navigational features that are a part of the page-object gem.

4 thoughts on “Screencast on navigational features of page-object

  1. Hey Cheezy,

    My application is quite complex. Is there a way to add page specific routes? That is routes that apply to a single page?

    Or, do you have any plans for future expansion, where your routes supports a graph of pages?

    Thanks

  2. Dave,

    It is possible to define many routes. Currently a route needs to be at least two pages. If you are only going to a single page then you could use the on or visit methods to just instantiate the object and interact with it. I would like to hear more about your idea of page specific routes. Would you mind starting a conversation about this on the page-object google group?

    At a couple of clients I have created several smaller routes (2-3 pages) and then selected the collection of routes to use based on what was being tested.

    -Cheezy

  3. This is an interesting concept. How would you handle the case where someone calls a method on a page that requires a parameter.

    For example, I might have:

    :default => [
    [Stardate, :convert_tng_stardate],
    [Warp, :warp_to_alpha_centaurai]
    ]

    Let’s say each of those actions takes a parameter:

    convert_tng_stardate(“58345.0″)
    warp_to_alpha_centauri(5)

    My current plan is to see if I can adopt your example, so that I can do this:

    :default => [
    [Stardate, :convert_tng_stardate, “58345.0”],
    [Warp, :warp_to_alpha_centaurai, 5]
    ]

    I wasn’t sure how you were handling this, however, so figured I’d ask.

    • Never mind. I see that this is accounted for. Oddly, the gem I had did not have the *args as part of the navigate_through_pages method. I have no idea how that is possible. Anyway, fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>