Hi Tiffany! Thanks for the welcome :)

It's my first time I read that method (fire_event), is very
interesting... I really can see neither with google chrome (google
chrome inspector) nor with ie7.0 (ie developer toolbar) nor with
firefox (firebug)  any event associated with the span tags. I try to
use onclick event but it doesn't work. I really don't want to bother
you but could someone help me and see for me if is there any event
associated?

I also want to ask you why ie developer toolbar show me an extra
attribute in the span tags, and firefox and google chrome
doesn't...The attribute name is

jquery123123123 (this number change in each span element) and the
value is an integer...

Thanks a lot.




On Dec 4, 2:31 pm, Tiffany Fodor <[email protected]> wrote:
> Hi Juan!
>
> Welcome to Watir General!
>
> Is there a javascript event associated with the calendar?  If so, you
> may need to fire the event to get the selected value to stick.
> Assuming it's associated with your 'a' object and the javascript event
> is named 'on_select':
>
> a.fire_event('on_select')
>
> Hope this helps!
>
> -Tiffany
>
> On Dec 4, 10:13 am, juanmaflyer <[email protected]> wrote:
>
>
>
> > Hi people! It's my first post here so let me knoe if I screwed it up
> > (is screw a regular or irregular verb?)
>
> > I will go directly to the grain:
>
> > I'm automating some things in this websitehttp://uat.viajo.com.br/
>
> > I'm trying to click a date in the calendar, the one that says 'Data de
> > ida'. Ok, I can open the calendar perfectly and I also can move around
> > the months, but when i want to click some specific day in order to
> > select the 'Departure Date' watir seems to fail. It click it but the
> > date is not written in the text-field (as it should be).
> > I have try to acces the span elements in different ways but none of
> > these ways helped me.
>
> > Strange data: I try to print the span element and also i have flash it
> > and this worked perfectly... the problem seems to be only when watir
> > try to click that span element.
>
> > Here is my code so far:
>
> > require 'watir'
>
> > ##open website
> > ie = Watir::IE.start("http://uat.viajo.com.br/";)
>
> > #click and open 'Data de ida' calendar
> > ie.div(:class=>'mainSprite buttonCalendarOn calendarImage').click
>
> > #select some specific day to set 'departure date'
> > a = ie.div(:class, /lastMonth/).div(:class, "daysGrid").span(:class =>
> > 'selectable', :text => '12')
>
> > # this works well
> > a.flash
>
> > # this also works well
> > puts a
>
> > # this doesn't work well! the calendar window is closed after
> > executing this line, but the date selected isn't written in the text-
> > field
> > a.click

-- 
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

Reply via email to