I think you should be able to trigger the date picker with one of these:
ie.image(:id, /imgCalCrDate/).click

or

ie.image(:id, /imgCalCrDate/).fire_event('onClick')

I've seen where the calendar can show up in a new ie popup window, as
well as just another layer in the same window, I can't tell that from
the HTML but if the date picker shows in a new ie window you'll need to
attach to it using something like this

ie2=IE.attach(:title, '<name of window>')

Once the date picker shows up (and you've attached to it if necessary)
I'm guessing you can probably select a date with something like this
(I've been able to it this way in the calendars I've run across):

ie.link(:text, '25').click #where 25 is the date to pick

#note -- ie would be ie2 if it's another window obviously


I've also been able to change the month and year (and use whatever other
controls may exist) in similar fashion using the appropriate regular
watir objects - select_list, link, text_field, button or whatever.

Hope this helps.





-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of sarita
Sent: Wednesday, January 24, 2007 1:55 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Inserting date from a Date picker handledthru
javascript

<TABLE cellSpacing=0 cellPadding=0 width="71%" border=0>
                       <TBODY>
                         <TR>
                           <TD width="38%" style="height: 24px"><input
name="ctl00$ContentPlaceHolder1$txtCreateDate" type="text"
id="ctl00_ContentPlaceHolder1_txtCreateDate" class="Input" style="WIDTH:
84px" size="8" readonly="readOnly" value="1/24/2007" />
&nbsp; &nbsp; &nbsp;&nbsp;
                           </TD>
                           <TD width="62%" style="height: 24px">
                           <img
id="ctl00_ContentPlaceHolder1_imgCalCrDate" onclick="javascript:return
popUpCalendar(this,ctl00_ContentPlaceHolder1_txtCreateDate,
'mm/dd/yyyy',
'__doPostBack(\'ctl00_ContentPlaceHolder1_txtCreateDate\')')"
src="../../../Javascript/cal/show_calendar.gif" align="absmiddle"
style="color:IndianRed;height:21px;width:29px;border-width:0px;" />
                           </TD>
                         </TR>
                       </TBODY>
                     </TABLE>
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6231&messageID=17580#17580
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to