Hi
I did fire a javascript event that will set the focus in the drop down
list:
$b.table(:index, 1)[2][6].fire_event("onmousedown")
When the above line is executed it does not display the drop but it is
focused. When I do either of the following:
$b.select_list(:index, 2).select("Test")
$b.select_list(:index, 2).set("Test")
It does not select the link. I have to somehow click on the drop down
arrow again in order to populate the drop down list. This is the same
behavior when selecting a value in the drop down list manually.
Thanks
On Mar 15, 5:29 pm, Tiffany Fodor <[email protected]> wrote:
> Hi!
>
> You have a typo in your select statement:
>
> $b.select_list(:index, 2).select_list("Test")
>
> should be:
>
> $b.select_list(:index, 2).select("Test") (although, I think
> $b.select_list(:index, 2).set("Test") should work as well)
>
> Have you tried firing your javascript to put focus on the field just
> before attempting the select statement?
>
> Hope this helps!
>
> -Tiffany
>
> On Mar 15, 2:43 pm, tester86 <[email protected]> wrote:
>
>
>
> > I need to click on a drop down. I have a script that will set the
> > focus in the drop down list then when I go to select the value it does
> > not select the list. Manually: When I click in the drop down field it
> > gets activated then when I click on the drop down arrow it will
> > display the list.
>
> > Interaction:
>
> > When I click in the cell it sets the focus, then I have to click on
> > the drop down arrow in order to see the list of options. If I do:
>
> > $b.table(:index, 1)[2][6].fire_event("onmousedown")
>
> > The above will set the focus in the field that contains the drop down.
> > Manually I have click on the drop down in order to see the list
>
> > If I do:
>
> > $b.select_list(:index, 2).select_list("Test")
>
> > It does not click on Test. Is there any way I can click on the drop
> > down in order to see the list..
--
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]