Hi, I am working on a select_list for a datepicker as below:
<https://lh4.googleusercontent.com/-TQg55FUCfk4/VKzcezWEOyI/AAAAAAAAAkM/WIE2vlEW92A/s1600/dob.jpg>
I have the following for my xpath:
select_list :date_list, xpath:'//div[@class="select-group
select-group-dob"]/div/div[@class="desktop-only"]/div[@class="custom-select"]/div/following-sibling::select[contains(@data-bind,
"dates")]'
select_list :month_list, xpath:'//div[@class="select-group
select-group-dob"]/div/div[@class="desktop-only"]/div[@class="custom-select"]/div/following-sibling::select[contains(@data-bind,
"months")]'
select_list :year_list, xpath:'//div[@class="select-group
select-group-dob"]/div/div[@class="desktop-only"]/div[@class="custom-select"]/div/following-sibling::select[contains(@data-bind,
"years")]'
and my method looks like:
def pick_date_of_birth day_value, month_value, year_value
self.date_list="#{day_value}"
sleep 1
self.month_list="#{month_value}"
sleep 1
self.year_list="#{year_value}"
sleep 1
end
but it gives me an error "Element is currently not visible and so may not
be interacted with.."
maybe because of the opacity="0"??
the div tag above it has just a span class="selectedOption" but same for
all three...
how will I get the correct XPath and call the correct method for the
datepicker?
Thanks!
On Wednesday, June 3, 2009 2:38:51 PM UTC+8, Raju wrote:
>
> No the radio button is not generated as a result of list selection.I
> have tried adding "reload" , but that also did not work.
> I tried with wait/sleep ..that also did not work.The same script works
> fine with IE.Firefox is the issue .
>
> Is it some bug with firewatir ..some library/api.
> As the same works properly with watir.
>
> Thanks ,
> Prashant
>
>
>
> On May 28, 11:26 pm, Chuck van der Linden <[email protected]> wrote:
> > Is the radio button created (rendered) as a result of the list
> > selection?
> >
> > You might just have to do a little sleep after the selection to give
> > the javascript time to render the element, so it can be found on the
> > page.
> >
> > If you use IRB to run that code manually, does it work? if so it's
> > likely just timing.. If not, then please tell us exactly what
> > happens.
> >
> > On May 28, 8:43 am, leva parivar <[email protected]> wrote:
> >
> >
> >
> > > Hi All,
> >
> > > I am also working on drop down lists...(select_list) and am facing a
> > > problem in selecting list inFirefox.
> > > The following piece of code works fine with IE(ie.select_list), but
> > > fails to work withFirefox3.0.10.
> > > I want to select the value from drop down list and then further click
> > > a radio button on same page.The select list and radio buttons are on a
> > > Ajax response.
> >
> > > Code ...
> > > ff.select_list(:id, 'capture_main_form:source').select('Phone')
> > > ff.select_list(:id, 'capture_main_form:languages').select('English')
> > > ff.radio(id,'capture_main_form:data_panel').set
> >
> > > Error displayed ...
> > > -FAIL-]>[Select: 'capture_main_form:source']
> > > Step failed: Check present: [Select: 'capture_main_form:source']
> > > Unexpected error from Watir runner: Unable to locate element,
> > > using :id, "capture_main_form:source"
> >
> > > If any one know this please let me know.
> > > Appreciate your help.
> >
> > > Thanks
> > > Prashant- Hide quoted text -
> >
> > - Show quoted text -
--
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.