Hi Ankur
That didn't work.
Code used:-
require 'watir'
ie=Watir::IE.attach(:title,//)
ie.frame(:index,1).frame(:index,1).text_field(:xpath,"//form
[...@id='stockEnq_loadDetails']/inp...@name='input FromDate']").flash
ie.frame(:index,1).frame(:index,1).text_field(:xpath,"//form
[...@id='stockEnq_loadDetails']/inp...@name='input FromDate']").set
Error returned:-
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/container.rb:
730:in `locate_input_element': undefined method `element_by_xpath' for
#<Watir::Frame:0x336f65c> (NoMethodError)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:5:in `locate'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
49:in `assert_exists'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
239:in `flash'
from dojo.rb:8
Kindly suggest another way to work on this control.
Thanks,
Betsy Joy
On Jan 18, 11:29 am, Ankur Gera <[email protected]> wrote:
> Hi Betsy,
> Try to use the following code and let me know whether it works fine or
> not.
>
> *
> ie.text_field(:xpath,"//fo...@id='stockEnq_loadDetails']/inp...@name='input
> FromDate']").flash
>
> ie.text_field(:xpath,"//fo...@id='stockEnq_loadDetails']/inp...@name='input
> FromDate']").set
> "xyz"
> *
> Thanks & Regards,
> Ankur Gera
> TCS
--
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/watir-general