On Tue, Jan 31, 2012 at 4:55 PM, Rahul Sharma <rahulsharma....@gmail.com>wrote:

>
> browser.select_list(:how, :what).enabled? I still get false as it
> still holds the reference to the old element and since the page hasn't
> refreshed it doesn't know its been now enabled by the javascript.
>

Element references in watir-webdriver are live - if the underlying element
changes, so will the return value of #disabled?
In any case, calling browserselect_list twice will always relocate the
element, so you're not holding on to any reference at all.

Without seeing the code (HTML/CSS/JS/Ruby) in question, it's hard to tell
why you're running into trouble, but some possible cases:

1. The .select_list call is not finding the element you think it is.
2. The disabled state is changing asynchronously, and you have a race
condition.

-- 
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