Maybe, you can try
browser.div(:*id, "idDiv_PWD_UsernameExample"*).send_keys "blah-blah"
or 
browser.div(:*id, "idDiv_PWD_UsernameExample"*).click
browser.send_keys "blah-blah"

That solution works for me perfectly (for text in divs)

On Saturday, February 2, 2013 8:19:11 PM UTC+2, mc060200778 wrote:
>
> Hi,
>
> my question is how to set value in the textbox with following html code 
>
> *<div id="idDiv_PWD_UsernameExample" class="placeholder ltr_override" 
> aria-hidden="true" style="cursor: text;">[email protected] <javascript:>
> </div>*
>
>
>
> *1st:*
> @browser = Watir::Browser.new :chrome 
> @browser.div(:id => "idDiv_PWD_UsernameExample").set 
> '[email protected]<javascript:>
> '
>
> *2nd:*
> @browser = Watir::Browser.new :chrome 
> @browser.text_field(:id => "idDiv_PWD_UsernameExample").set ("
> [email protected] <javascript:>")
>
>
> *3rd:*
> @browser = Watir::Browser.new :chrome 
> @browser.div(:class => "*placeholder ltr_override*").set 
> ("[email protected]<javascript:>
> ")
>
>
>

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

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to