Rich calender how to get value

1,063 views
Skip to first unread message

naresh

unread,
Jun 24, 2010, 7:07:05 AM6/24/10
to Watir General
Hi All,

I am using rich-faces calender in my web application, i want to set
value to calendar.
Can anyone guide me how to do that in watir?


Regards,
Naresh

Željko Filipin

unread,
Jun 24, 2010, 7:10:50 AM6/24/10
to watir-...@googlegroups.com
On Thu, Jun 24, 2010 at 1:07 PM, naresh <nareshv...@gmail.com> wrote:
> Can anyone guide me how to do that in watir?

What is the problem? What have you tried? Is the calendar public, so we could try too?

Željko
--
watir.com - community manager
watirpodcast.com - host
testingpodcast.com - audio podcasts on software testing. all of them
vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

naresh

unread,
Jun 24, 2010, 7:17:16 AM6/24/10
to Watir General
Hi ,

Fot input text , text_field method is available.
What method is available for following rich calender

<rich:calendar value="#{eventBean.instance.endDate}"
timeZone="#{org.jboss.seam.international.timeZone}"
enableManualInput="true" datePattern="dd-MM-yyyy" id="endDate"/>

Regards



On Jun 24, 4:10 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:

orde

unread,
Jun 24, 2010, 1:23:43 PM6/24/10
to Watir General
I google'd up a RichFaces example: http://livedemo.exadel.com/richfaces-demo/richfaces/calendar.jsf.
It looks like you don't enter the date into the text field, but--
rather--you click on the calendar icon and select a date.

Peeking at the (ajax-heavy) HTML, you'll probably need to click on the
calender image and then use the fire_event method to trigger the event
handlers in the elements that you need to access.

Here's the link to the fire_event documentation:
http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/Element.html#M000557

Hope it helps.

orde

naresh

unread,
Jun 25, 2010, 7:44:03 AM6/25/10
to Watir General
Hi ,

<s:decorate id="endDateDecorate" template="../layout/edit.xhtml">
<ui:define name="label">#{label.title_end_date}:</ui:define>
<rich:calendar value="#{eventBean.instance.endDate}"
timeZone="#{org.jboss.seam.international.timeZone}"
enableManualInput="true" datePattern="dd-MM-yyyy" id="endDate"/> </
s:decorate>

HTML code generated for above calnder,can anyone guide me how to click
calendar in watir script


<div id="globalForm:startDateDecorate">
<div class="prop"><label
for="globalForm:startDateDecorate:startDate" class="name ">Start
Date:</label>
<span class="value "><span
id="globalForm:startDateDecorate:startDatePopup">
<input class="rich-calendar-input "
id="globalForm:startDateDecorate:startDateInputDate"
name="globalForm:startDateDecorate:startDateInputDate" style="vertical-
align: middle; " type="text" /><img alt="" class="rich-calendar-button
" id="globalForm:startDateDecorate:startDatePopupButton"
style="vertical-align: middle" src="/venus/a4j/g/
3_3_1.GAorg.richfaces.renderkit.html.iconimages.CalendarIcon/DATB/
eAE7fv4Kw6znAA4mA-w_" /><input
id="globalForm:startDateDecorate:startDateInputCurrentDate"
name="globalForm:startDateDecorate:startDateInputCurrentDate"
style="display:none" type="hidden" value="06/2010" /></span><div
id="globalForm:startDateDecorate:startDateIFrame" style="display:
none;"></div><div id="globalForm:startDateDecorate:startDate"
style="display: none;"></div><div
id="globalForm:startDateDecorate:startDateScript" style="display:
none;"><script type="text/javascript">new
Calendar('globalForm:startDateDecorate:startDate', {dayListTableId:
'globalForm:startDateDecorate:startDateDay',
weekNumberBarId: 'globalForm:startDateDecorate:startDateWeekNum',
weekDayBarId: 'globalForm:startDateDecorate:startDateWeekDay',
currentDate: new Date(2010,5,25),
selectedDate: null,
datePattern: 'dd-MM-yyyy',
jointPoint: 'bottom-left',
direction: 'bottom-right',
boundaryDatesMode:'inactive',
popup: true,
enableManualInput: true,
showInput: true,
disabled: false,
readonly: false,
ajaxSingle: true,
verticalOffset:0,
horizontalOffset: 0,
style:'z-index: 3; ',
firstWeekDay: 0,
minDaysInFirstWeek: 1,
todayControlMode:'select',
showHeader:true,
showFooter:true,
showWeeksBar:true,
showWeekDaysBar:true,
showApplyButton:false,
resetTimeOnDateSelect:false,
defaultTime:{hours:12,minutes:0},
labels:{apply:'Apply', today:'Today', clean:'Clean', cancel:'Cancel',
ok:'OK', close:'x'},
'monthLabels':
['January','February','March','April','May','June','July','August','September','October','November','December'] ,
'monthLabelsShort':
['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] ,
'weekDayLabels':
['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'] ,
'weekDayLabelsShort':
['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] }).load();</script></div>
</span>
<span class="error">
</span>
</div></div>

Regards,
Naresh

naresh

unread,
Jun 28, 2010, 6:54:06 AM6/28/10
to Watir General
Hi,

Anyone can guide me?
I am struck in calender.

Regards,
Naresh

Željko Filipin

unread,
Jun 28, 2010, 6:59:51 AM6/28/10
to watir-...@googlegroups.com
On Mon, Jun 28, 2010 at 12:54 PM, naresh <nareshv...@gmail.com> wrote:
> Anyone can guide me?
> I am struck in calender.

Which HTML element do you need to access (click, set...) in the HTML you have provided?

Željko

naresh

unread,
Jun 28, 2010, 7:22:25 AM6/28/10
to Watir General

i want to click calender and select date 28-May-2010.


On Jun 28, 3:59 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:

Željko Filipin

unread,
Jun 28, 2010, 7:29:05 AM6/28/10
to watir-...@googlegroups.com
On Mon, Jun 28, 2010 at 1:22 PM, naresh <nareshv...@gmail.com> wrote:
> i want to click calender

I am asking what do you need to click. Do you know how to use a tool like Firebug?

http://getfirebug.com/

Željko

naresh

unread,
Jun 28, 2010, 8:07:59 AM6/28/10
to Watir General
Hi All,

i am using internet explorer to test my web application.
I have to click save button in my application to create record.
I am able to set value for textfield,radibutton,selectlist in watir
script ,
but not able to set/pickup value for calender.
This calender is rich calender<rich:calender> from Rcihfaces.
The html code generated i am pasting once again.
I want to pick up date like 28-May-2010 or any other date.
On Jun 28, 4:29 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:

Chuck van der Linden

unread,
Jun 29, 2010, 11:32:33 AM6/29/10
to Watir General
If it's the same as the sample that was linked early in the thread,
when this control is rendered in the UI, it is a series of table
cells, and each cell is 'wired' for a number of events. You may need
to experiment with what events are fired in what order, I'd start
however with trying the following

What you are looking at is structured around a table, and each date is
a cell. Because some dates appear more than once you cannot reliably
identify by the cell text alone, and will need to use some other means
to identify the 'right' type of cell that has the right text. The ID
is completely positional within the grid, meaning that it's
relationship to the date will be different each month (7
possibilties). that makes using ID to get the right cell a total
pain. This would seem to make the best option to utilize the CLASS of
the cell, since the controll uses a small set of potential classes
(borders, holidays, workdays) So using Class along with Text might
be your best bet, presuming of course that you want to pick a date in
the current month of the current year etc. (otherwise you are going
to need to first click in the navigation cell, part of an inner table,
that lets you pick month and year. OTOH since those values are
unique, you should be able to select them by cell text alone.

.. So it will depend on if you test uses some date relative to
'today' or is always picking the same date. Relative to Today is
fairly easy given Ruby's fairly robust stuff for handling dates, but
is problimatic in that the date could end up falling on a holiday,
meaning it would be difficult to predict the cell's class ahead of
time

If you are going to always pick the same date, choose one that is NOT
in the current month, otherwise your script will break as soon as the
month changes. This means you will first need to set the calendar
control to a specific year and month, THEN pick your day of the week.

Identify it as a Cell element within a Table, In the example the
main table container in the example has the Class "rich-calendar-
exterior rich-calendar-popup undefined"

The cells for dates have three potential classes, there's a special
one for 'border' days (the dates in the months before or after the
current month) one for the 'holidays' (sat and sun) and one for the
weekdays of the current month..

If I wanted to pick a weekday of the current month, then once the
proper thing is clicked to make the calendar visiable (rendered) you
could so something along these lines I think

browser.cell(:class => "j_id354_j_id355DayCell rich-calendar-cell rich-
calendar-btn", :text => "16").click

Since I'm not too sure of the first part of that class (might be
dynamically created) you might have to use a regular expression just
using the second part (/rich-calendar-cell rich-calendar-btn/) in
order to reliably identify the cell by class and text.

(that presumes just doing a click is good enough, potentially you
might have to fire other events, you'll need to experiment)

The IE developer Toolbar is a great help in making sense of controls
like this, as it allows you to view the control as it is rendered into
the DOM, (Firebug has similary abilities, I just know how to use the
IE tool better, so it's what I use)
> ['January','February','March','April','May','June','July','August','Septemb­er','October','November','December'] ,
> 'monthLabelsShort':
> ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] ,
> 'weekDayLabels':
> ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'] ,
> 'weekDayLabelsShort':
> ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] }).load();</script></div>
>         </span>
>  <span class="error">
>  </span>
> </div></div>
>
> On Jun 28, 4:29 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
> wrote:
>
>
>
> > On Mon, Jun 28, 2010 at 1:22 PM, naresh <nareshvatsa...@gmail.com> wrote:
> > > i want to click calender
>
> > I am asking what do you need to click. Do you know how to use a tool like
> > Firebug?
>
> >http://getfirebug.com/
>
> > Željko- Hide quoted text -
>
> - Show quoted text -

naresh

unread,
Jun 30, 2010, 1:38:09 AM6/30/10
to Watir General
Hi,

I am confused in rich calender, i need to click image and then get
elements or
do like following

ie.cell(:class => "j_id354_j_id355DayCell rich-calendar-cell rich-
calendar-btn", :text => "16").click which Linden suggested.

I am confused class, there is 2 classes in HTML code.
class="rich-calendar-input "
class="rich-calendar-button"
which one to use.
My requirement to select a 30-jun-2010 date from calender.

Regards,
Naresh

Wesley Chen

unread,
Jun 30, 2010, 8:51:23 AM6/30/10
to watir-...@googlegroups.com
If you are not sure what you want to do, please try the cases you have.

Wesley.
For life, the easier, the better.


--
Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

You received this message because you are subscribed to http://groups.google.com/group/watir-general
To post: watir-...@googlegroups.com
To unsubscribe: watir-genera...@googlegroups.com

Chuck van der Linden

unread,
Jun 30, 2010, 2:04:47 PM6/30/10
to Watir General
You have to ask yourself how much value you provide to your project by
testing some third party tool beyond it's being integrated properly
into your product.

If it was me, I'd look for the most expedient way to get the value I
needed 'set' If the calendar has an input box that accepts my typing
into it, then doing something similar to that in your tests might be
the best route. As always with any tool that drives the browser
(Watir, Selenium, etc) you look at 'what do I do manually to control
this thing?' and then basically find ways to simulate that using the
automation code. If it LETS you just click in a given spot and input
a value, then that's what I'd try to automate in most of my cases
(beyond one basic test that the calendar works when you pick the date
that way)

But some of these tools, the ONLY way to get the date into the field
is by 'picking' it from the calendar, and there is no 'manual entry'
option that lets you 'type' in a value. So you are stuck automating
the clicking on specific cells in the calendar. To do that you need
to write a script that's going to work a month or a year from now, so
you'll need to go throught the motions of clicking in the portion (a
sub table in the example I looked at) of the control that lets you
pick the year and month, Then picking the year and month, THEN picking
the day of the month. Otherwise a day from now you'll be clicking on
July 30 instead of June 30

Based on the sample I looked at, almost all of those are going to
be .cell elements, and hopefully just doing a 'click' on the element
will work for what you need.
> > Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > You received this message because you are subscribed to
> >http://groups.google.com/group/watir-general
> > To post: watir-...@googlegroups.com
> > To unsubscribe: watir-genera...@googlegroups.com<watir-general%2Bunsubscribe@goog­legroups.com>- Hide quoted text -

naresh

unread,
Jul 1, 2010, 6:03:24 AM7/1/10
to Watir General
Hi,


I am using below line to click date in calender

ie.cell(:class => " rich-calendar-input rich-calendar-
button",:text=>"Monday",:text=>"March").click;

but i am getting exception.



c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:56:in
`assert_ex
ists': Unable to locate element, using {:class=>" rich-calendar-input
rich-calen
dar-button", :text=>"March"}
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:288
:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:60:
in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:233
:in `click!'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:219
:in `click'
from Event-Insert-play.rb:21
> ...
>
> read more »

Željko Filipin

unread,
Jul 1, 2010, 6:16:48 AM7/1/10
to watir-...@googlegroups.com
On Thu, Jul 1, 2010 at 12:03 PM, naresh <nareshv...@gmail.com> wrote:
> ie.cell(:class => " rich-calendar-input rich-calendar-
> button",:text=>"Monday",:text=>"March").click;

Several problems:

- leading space in " rich-calendar..."
- you are saying that there is cell with exactly text "Monday" and "March" - a cell can have exactly one of two strings, not both
- if both texts should be in the same cell, try this

ie.cell(:class => "rich-calendar-input rich-calendar-button",:text=>/Monday.*March/).click;

Željko

naresh

unread,
Jul 1, 2010, 6:44:28 AM7/1/10
to Watir General
Hi ,

Can anyone tell me in below script , what is
monthLabels,weekDayLabels, are these cell or link in calender.
I am trying to select, Monday,March from calender.
I used 2 approach

ie.cell(:class => "rich-calendar-inputrich-calendar-button",:text=>/
Monday.*March/).click;

ie.table(:id,
"globalForm:startDateDecorate:startDate").link(:weekDayLabels,
"Monady").link(:monthLabels, "March").click

I am getting exception unable to locate object.
resetTimeOnDateSelect:false,
defaultTime:{hours:12,minutes:0},
labels:{apply:'Apply', today:'Today', clean:'Clean',
cancel:'Cancel',
ok:'OK', close:'x'},
'monthLabels':
['January','February','March','April','May','June','July','August','September','October','November','December'] ,
'monthLabelsShort':
['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'] ,
'weekDayLabels':
['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'] ,
'weekDayLabelsShort':
['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] }).load();</script></div>
</span>
<span class="error">
</span>






On Jul 1, 3:16 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:

Željko Filipin

unread,
Jul 1, 2010, 7:04:12 AM7/1/10
to watir-...@googlegroups.com
On Thu, Jul 1, 2010 at 12:44 PM, naresh <nareshv...@gmail.com> wrote:
> Can anyone tell me in below script , what is
> monthLabels,weekDayLabels, are these cell or link in calender.

Do you know that javascript can create HTML? Calendar that you want to automate is not visible in page source, it is visible in a tool like Firebug (Firefox) or IE dev toolbar (IE).

Željko

naresh

unread,
Jul 1, 2010, 8:00:35 AM7/1/10
to Watir General
Hi,
I tried to select date with following
ie.table(:id, "globalForm:startDateDecorate:startDate").link(:text,
"30").click
i got exception
Unable to locate element, using :text, "30" unknownobjectexcception.

In IE dev toolbar HTML code is for rich-calender is like below



<TABLE class="rich-calendar-exterior rich-calendar-popup"
id="globalForm:startDateDecorate:startDate" style="DISPLAY: none; Z-
INDEX: 3; LEFT: 378px; POSITION: absolute; TOP: 346px" onclick="$
('globalForm:startDateDecorate:startDate').component.skipEventOnCollapse=true;"
cellSpacing="0" cellPadding="0" border="0"
richfacesComponent="richfaces:calendar">
<TBODY>
<TR>
<TD class="rich-calendar-header"
id="globalForm:startDateDecorate:startDateHeader" colSpan="8">
<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
<TBODY>
<TR>
<TD class="rich-calendar-tool">
<DIV onmouseup="this.className='rich-calendar-tool-btn rich-calendar-
tool-btn-hover'" class="rich-calendar-tool-btn"
onmousedown="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover rich-calendar-tool-btn-press'"
onmouseover="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover'"
onclick="Richfaces.getComponent('calendar',this).prevYear();return
true;" onmouseout="this.className='rich-calendar-tool-btn'">
&lt;&lt;
</DIV>
</TD>
<TD class="rich-calendar-tool">
<DIV onmouseup="this.className='rich-calendar-tool-btn rich-calendar-
tool-btn-hover'" class="rich-calendar-tool-btn"
onmousedown="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover rich-calendar-tool-btn-press'"
onmouseover="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover'"
onclick="Richfaces.getComponent('calendar',this).prevMonth();return
true;" onmouseout="this.className='rich-calendar-tool-btn'">
&lt;
</DIV>
</TD>
<TD class="rich-calendar-month">
<DIV onmouseup="this.className='rich-calendar-tool-btn rich-calendar-
tool-btn-hover'" class="rich-calendar-tool-btn"
onmousedown="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover rich-calendar-tool-btn-press'"
onmouseover="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover'"
onclick="Richfaces.getComponent('calendar',this).showDateEditor();return
true;" onmouseout="this.className='rich-calendar-tool-btn'">
July, 2010
</DIV>
</TD>
<TD class="rich-calendar-tool">
<DIV onmouseup="this.className='rich-calendar-tool-btn rich-calendar-
tool-btn-hover'" class="rich-calendar-tool-btn"
onmousedown="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover rich-calendar-tool-btn-press'"
onmouseover="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover'"
onclick="Richfaces.getComponent('calendar',this).nextMonth();return
true;" onmouseout="this.className='rich-calendar-tool-btn'">
&gt;
</DIV>
</TD>
<TD class="rich-calendar-tool">
<DIV onmouseup="this.className='rich-calendar-tool-btn rich-calendar-
tool-btn-hover'" class="rich-calendar-tool-btn"
onmousedown="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover rich-calendar-tool-btn-press'"
onmouseover="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover'"
onclick="Richfaces.getComponent('calendar',this).nextYear();return
true;" onmouseout="this.className='rich-calendar-tool-btn'">
&gt;&gt;
</DIV>
</TD>
<TD class="rich-calendar-tool rich-calendar-tool-close">
<DIV onmouseup="this.className='rich-calendar-tool-btn rich-calendar-
tool-btn-hover'" class="rich-calendar-tool-btn"
onmousedown="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover rich-calendar-tool-btn-press'"
onmouseover="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover'"
onclick="Richfaces.getComponent('calendar',this).close(false);return
true;" onmouseout="this.className='rich-calendar-tool-btn'">
x
</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR id="globalForm:startDateDecorate:startDateWeekDay">
<TD class="rich-calendar-days">
<BR />
</TD>
<TD class="rich-calendar-days rich-calendar-weekends"
id="globalForm:startDateDecorate:startDateWeekDayCell0">
Sun
</TD>
<TD class="rich-calendar-days"
id="globalForm:startDateDecorate:startDateWeekDayCell1">
Mon
</TD>
<TD class="rich-calendar-days"
id="globalForm:startDateDecorate:startDateWeekDayCell2">
Tue
</TD>
<TD class="rich-calendar-days"
id="globalForm:startDateDecorate:startDateWeekDayCell3">
Wed
</TD>
<TD class="rich-calendar-days"
id="globalForm:startDateDecorate:startDateWeekDayCell4">
Thu
</TD>
<TD class="rich-calendar-days"
id="globalForm:startDateDecorate:startDateWeekDayCell5">
Fri
</TD>
<TD class="rich-calendar-days rich-calendar-weekends rich-right-cell"
id="globalForm:startDateDecorate:startDateWeekDayCell6">
Sat
</TD>
</TR>
<TR id="globalForm:startDateDecorate:startDateWeekNum1">
<TD class="rich-calendar-week "
id="globalForm:startDateDecorate:startDateWeekNumCell1">
27
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-calendar-boundary-dates"
id="globalForm:startDateDecorate:startDateDayCell0" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
27
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
boundary-dates" id="globalForm:startDateDecorate:startDateDayCell1"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
28
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
boundary-dates" id="globalForm:startDateDecorate:startDateDayCell2"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
29
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
boundary-dates" id="globalForm:startDateDecorate:startDateDayCell3"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
30
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
today rich-calendar-select"
id="globalForm:startDateDecorate:startDateDayCell4" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
1
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell5" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
2
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-right-cell rich-calendar-btn"
id="globalForm:startDateDecorate:startDateDayCell6" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
3
</TD>
</TR>
<TR id="globalForm:startDateDecorate:startDateWeekNum2">
<TD class="rich-calendar-week "
id="globalForm:startDateDecorate:startDateWeekNumCell2">
28
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-calendar-btn"
id="globalForm:startDateDecorate:startDateDayCell7" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
4
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell8" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
5
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell9" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
6
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell10"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
7
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell11"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
8
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell12"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
9
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-right-cell rich-calendar-btn"
id="globalForm:startDateDecorate:startDateDayCell13" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
10
</TD>
</TR>
<TR id="globalForm:startDateDecorate:startDateWeekNum3">
<TD class="rich-calendar-week "
id="globalForm:startDateDecorate:startDateWeekNumCell3">
29
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-calendar-btn"
id="globalForm:startDateDecorate:startDateDayCell14" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
11
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell15"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
12
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell16"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
13
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell17"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
14
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell18"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
15
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell19"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
16
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-right-cell rich-calendar-btn"
id="globalForm:startDateDecorate:startDateDayCell20" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
17
</TD>
</TR>
<TR id="globalForm:startDateDecorate:startDateWeekNum4">
<TD class="rich-calendar-week "
id="globalForm:startDateDecorate:startDateWeekNumCell4">
30
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-calendar-btn"
id="globalForm:startDateDecorate:startDateDayCell21" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
18
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell22"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
19
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell23"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
20
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell24"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
21
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell25"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
22
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell26"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
23
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-right-cell rich-calendar-btn"
id="globalForm:startDateDecorate:startDateDayCell27" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
24
</TD>
</TR>
<TR id="globalForm:startDateDecorate:startDateWeekNum5">
<TD class="rich-calendar-week "
id="globalForm:startDateDecorate:startDateWeekNumCell5">
31
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-calendar-btn"
id="globalForm:startDateDecorate:startDateDayCell28" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
25
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell29"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
26
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell30"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
27
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell31"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
28
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell32"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
29
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell33"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
30
</TD>
<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
holly rich-right-cell rich-calendar-btn"
id="globalForm:startDateDecorate:startDateDayCell34" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
31
</TD>
</TR>
<TR id="globalForm:startDateDecorate:startDateWeekNum6">
<TD class="rich-calendar-week rich-bottom-cell "
id="globalForm:startDateDecorate:startDateWeekNumCell6">
32
</TD>
<TD class="rich-bottom-cell rich-calendar-cell-size rich-calendar-cell
rich-calendar-holly rich-calendar-boundary-dates"
id="globalForm:startDateDecorate:startDateDayCell35" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
1
</TD>
<TD class="rich-bottom-cell rich-calendar-cell-size rich-calendar-cell
rich-calendar-boundary-dates"
id="globalForm:startDateDecorate:startDateDayCell36" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
2
</TD>
<TD class="rich-bottom-cell rich-calendar-cell-size rich-calendar-cell
rich-calendar-boundary-dates"
id="globalForm:startDateDecorate:startDateDayCell37" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
3
</TD>
<TD class="rich-bottom-cell rich-calendar-cell-size rich-calendar-cell
rich-calendar-boundary-dates"
id="globalForm:startDateDecorate:startDateDayCell38" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
4
</TD>
<TD class="rich-bottom-cell rich-calendar-cell-size rich-calendar-cell
rich-calendar-boundary-dates"
id="globalForm:startDateDecorate:startDateDayCell39" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
5
</TD>
<TD class="rich-bottom-cell rich-calendar-cell-size rich-calendar-cell
rich-calendar-boundary-dates"
id="globalForm:startDateDecorate:startDateDayCell40" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
6
</TD>
<TD class="rich-bottom-cell rich-calendar-cell-size rich-calendar-cell
rich-calendar-holly rich-right-cell rich-calendar-boundary-dates"
id="globalForm:startDateDecorate:startDateDayCell41" onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(event,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(event,
this);">
7
</TD>
</TR>
<TR>
<TD class="rich-calendar-footer"
id="globalForm:startDateDecorate:startDateFooter" colSpan="8">
<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">
<TBODY>
<TR>
<TD class="rich-calendar-toolfooter">
<DIV class="rich-calendar-tool-btn"
onclick="Richfaces.getComponent('calendar',this).showSelectedDate();
return true;">
01-07-2010
</DIV>
</TD>
<TD class="rich-calendar-toolfooter">
<DIV onmouseup="this.className='rich-calendar-tool-btn rich-calendar-
tool-btn-hover'" class="rich-calendar-tool-btn"
onmousedown="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover rich-calendar-tool-btn-press'"
onmouseover="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover'"
onclick="Richfaces.getComponent('calendar',this).resetSelectedDate();return
true;" onmouseout="this.className='rich-calendar-tool-btn'">
Clean
</DIV>
</TD>
<TD class="rich-calendar-toolfooter" style="DISPLAY: none">
</TD>
<TD class="rich-calendar-toolfooter" style="BACKGROUND-IMAGE: none"
width="100%">
</TD>
<TD class="rich-calendar-toolfooter" style="BACKGROUND-IMAGE: none">
<DIV onmouseup="this.className='rich-calendar-tool-btn rich-calendar-
tool-btn-hover'" class="rich-calendar-tool-btn"
onmousedown="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover rich-calendar-tool-btn-press'"
onmouseover="this.className='rich-calendar-tool-btn rich-calendar-tool-
btn-hover'"
onclick="Richfaces.getComponent('calendar',this).today();return true;"
onmouseout="this.className='rich-calendar-tool-btn'">
Today
</DIV>
</TD>
<TD class="rich-calendar-toolfooter" style="DISPLAY: none; BACKGROUND-
IMAGE: none">
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY>
</TABLE>






On Jul 1, 4:04 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:

Željko Filipin

unread,
Jul 1, 2010, 8:27:47 AM7/1/10
to watir-...@googlegroups.com
Does this work?

ie.table(:id, "globalForm:startDateDecorate:startDate").cell(:text, "30").click

Or this?

ie.cell(:text, "30").click

If it clicks the date, but nothing happens, you probably have to fire some JS event.

Željko

naresh

unread,
Jul 6, 2010, 6:06:00 AM7/6/10
to Watir General
Hi,
I tried both option, but i am getting same exception unable to locate
element

ie.table(:id,
"globalForm:startDateDecorate:startDate").cell(:text,"30").click
Or
ie.cell(:text, "30").click

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:56:in
`assert_ex
ists': Unable to locate element, using :text,
"30" (Watir::Exception::UnknownObj
ectException)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:288
:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:60:
in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:233
:in `click!'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:219
:in `click'
from Event-Insert-play.rb:21





c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:56:in
`assert_ex
ists': Unable to locate element, using :text,
"30" (Watir::Exception::UnknownObj
ectException)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:288
:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:60:
in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:233
:in `click!'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
element.rb:219
:in `click'
from Event-Insert-play.rb:23


On Jul 1, 5:27 pm, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:

Chuck van der Linden

unread,
Jul 8, 2010, 3:39:08 AM7/8/10
to Watir General
They are both failing because as I indicated earlier, there is more
than one cell in the table with the text '30" in it. Try using both
the class of the cell, and the text, as I specifically said in an
earlier response

There is first this 'boundary' one from the month before

<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
boundary-dates" id="globalForm:startDateDecorate:startDateDayCell3"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(e­
vent,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event­,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(ev­
ent,
this);">
30
</TD>


Then this main one from the current month

<TD class="rich-calendar-cell-size rich-calendar-cell rich-calendar-
btn" id="globalForm:startDateDecorate:startDateDayCell33"
onmouseover="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOver(e­
vent,
this);" onclick="$
('globalForm:startDateDecorate:startDate').component.eventCellOnClick(event­,
this);" onmouseout="$
('globalForm:startDateDecorate:startDate').component.eventCellOnMouseOut(ev­
ent,
this);">
30
</TD>

Watir doesn't know which one you want.

So identify the cell by both the class, and the text, and it should
work for you

I would NOT use ID's because they are absolute position based in this
table, and the dates are going to shift around from month to month as
to which ID they are inside, better to be in the habit of using the
class name in this instance, combined with the text
Reply all
Reply to author
Forward
0 new messages