Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Adding a Class for site specific objects

#24

Document where/how is the best place to add a new class for site specific objects that fits in with your plans for WatirCraft. Where is the best place to add the class definition and how do you instantiate it so it can be used throughout the site.

An example of such a class might be a shopping cart that is manipulated from a number of different pages.

Reported by Jim Matthews · April 7th, 2009 @ 03:52 PM

State: resolved
Milestone: 0.5.0
Assigned to: bret (at watircraft) bret (at watircraft)

Activity

  1. bret (at watircraft)
    bret (at watircraft)

    This is what the site.rb file is for. You add your own method to your site and you can access the site from your tests as "site".

    April 7th, 2009 @ 04:16 PM

  2. bret (at watircraft)
    bret (at watircraft)
    • Milestone set to 0.5.0
    • State changed from new to open

    New "methods" feature should make this more clear.

    April 9th, 2009 @ 07:36 PM

  3. bret (at watircraft)
    bret (at watircraft)
    • State changed from open to resolved

    April 10th, 2009 @ 11:27 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.