I don't have any ideas why it works in irb for you :)

You'd also have to call ````#to_subtype```` to convert to Watir::TextField so 
you could use ````#set````.

For example:
````
@browser.elements(:css=>"input[type=password]").each { |element| 
element.to_subtype.value = "test"}
````

However, i would not use ````#elements```` and ````:css```` locators ever since 
it is the slowest combination possible.

I would use ````#text_fields```` instead:
````
@browser.text_fields.each { |field| field.value = "test"}
````

If it is really important to just set value to ````password```` fields, then 
i'd do like this:
````
@browser.text_fields.select { |field| field.type == "password" }.each { |field| 
field.value = "test"}
````

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir/issues/7#issuecomment-12556108
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to