If you aren't trying to do anything complicated - and
the calendar control responds to keyboard input - you
might want to try using the send_keys method to set
the calendar control:

ie.image(:id, "my_calendar_icon").click
ie.send_keys("{UP}")
ie.send_keys("{LEFT}")
ie.send_keys("{ENTER}")

The drawback is that this approach may not let you
exercise all of the calendar control's functionality.
But if you're just worried about setting a date it's
probably enough to get you past the control without
worrying about the Javascript.  

--- "Danilova, Elza" <[EMAIL PROTECTED]> wrote:

> Using WATIR I am having problem to create a document
> that includes the
> calendar function. 
> 
> How can I drive a java script to execute the
> calendar function, where
> the text field can not be populated with the date
> and it's only allow
> you to select a date by clicking on the calendar
> icon? 
> 
> Thank you,
> 
> Elza
> 
> 
> "This e-mail and any attachments may contain
> confidential and privileged information. Any
> dissemination or use of the information by a person
> other than the intended recipient is unauthorized
> and may be illegal. If you are not the intended
> recipient, please notify the sender immediately by
> return e-mail, delete this e-mail and destroy any
> copies. Although this e-mail and any attachments are
> believed to be free of any virus or other defect
> that might affect any computer system into which it
> is received and opened, it is the responsibility of
> the recipient to ensure that it is virus free and no
> responsibility is accepted by the Board of Trade of
> the City of New York, Inc. or the New York Clearing
> Corporation for any loss or damage arising in any
> way from its use. Thank you."
>  
> 
> 
> > _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to