I am not sure i understand this question but if you are using page objects then
module Site
class OrderPage < ::Taza::Page (only if you are using taza generally
this would be '< BasePage' or however your page objects are set up)
element(:promo_code) { browser.text_field(:id, 'promotional_code') }
end
end
then in your code
site.order_page.promo_code.set '00A23B00C12'
so if you change what its called in the page you would change your locator
lets say you changed the id from 'promotional_code' to 'promo_code'
you would only have to change it in the OrderPage class and not in the
rest of your tests
hope that helps
On Mon, Oct 24, 2011 at 10:12 AM, Matt <[email protected]> wrote:
> Hey guys,
>
> I was just wondering, if I have 400 scripts, using object "myobject"
> currently in location x.
>
> If I change it's name or slightly chance its location, how does Watir
> keep it within scope?
>
> Cheers,
> Matt
>
> --
> Before posting, please read http://watir.com/support. In short: search before
> you ask, be nice.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]
>
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]