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


On Jul 6, 3:06 am, naresh <[email protected]> wrote:
> 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 <[email protected]>
> wrote:
>
>
>
> > 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- Hide quoted text -
>
> - Show quoted text -

-- 
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: [email protected]
To unsubscribe: [email protected]

Reply via email to