So, I navigate to a page on my test site and define a bunch of variables as 
page objects, like so:

site_name = browser.text_field(:id, "sitename")
site_url = browser.text_field(:id, "url")
etc. ...

I then navigate to a new page with a browser.goto. On the new page I define 
some additional variables, like so:

campaign_name = browser.text_field(:id, "campname")
etc. ...

However, if I now want to get a site_name.value it turns out that it's 
empty.

In some sense I can understand why this is the case, but in others I can't.

Can someone explain the thinking behind the decision that led to Watir being 
built this way?

I can easily switch my variable definitions to look like this:

site_name = browser.text_field(:id, "sitename").value

... but that seems to rob me of a lot of the flexibility (and code 
readability) that Watir has to offer.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to