Clicking a menu item

1 view
Skip to first unread message

FM

unread,
Oct 7, 2008, 5:27:42 PM10/7/08
to Watir General
Hi,

I am trying to click a menu item on the webpage using it's id but it
does not seem to work. Any suggestion? The menu item is contained by
<span> element.

Thank you.

Tiffany Fodor

unread,
Oct 7, 2008, 5:56:39 PM10/7/08
to Watir General
Hi!

Have you tried clicking on the span itself?

ie.span(:text, 'SpanText').click

-Tiffany

Fukaya Yoshikazu

unread,
Oct 7, 2008, 8:01:07 PM10/7/08
to watir-...@googlegroups.com
help me

How can I access to the following text_field !
I could not get to it by using
"ie.text_field(:name,'miseCode').set('1234')"
Why!
can't Watir access to a text_field without 'type=' like this?
------------------------------------------
<TBODY><TR>

<TD>title</TD>

<TD><INPUT maxLength=4 size=6 value=201 name=miseCode> <INPUT maxLength=7
size=10 value=167 name=kyakCode> <INPUT type=hidden value=201 name=miseC>
<INPUT type=hidden value=167 name=kyakC> </TD></TR></TBODY>

------------------------------------------

wesley chen

unread,
Oct 7, 2008, 8:40:36 PM10/7/08
to watir-...@googlegroups.com
Weird, I can make it with your code.

Fatema Karim

unread,
Oct 8, 2008, 10:29:50 AM10/8/08
to watir-...@googlegroups.com

Hi Tiffany, 

I have tried the Span with it's id but that did not work. 

Natasha Ranney

unread,
Oct 8, 2008, 10:52:53 AM10/8/08
to watir-...@googlegroups.com
Not sure. But, did you try the following:

$ie.span(:id,"Id_Of_Span").link(:index,1).click

Fatema Karim

unread,
Oct 8, 2008, 2:34:33 PM10/8/08
to watir-...@googlegroups.com

It worked after i have tried the following:

$ie.frame(:id, "frameID").image(:id, /ImageID/).fire_event('onMouseover')

but now when it clicks on the menu it opens up a tiny window inside span where I need to click a button but that does not seem to work properly :( 

Edward Deng

unread,
Oct 9, 2008, 4:06:48 AM10/9/08
to watir-...@googlegroups.com
Is your code in a FRAME or IFRAME? if so, please try "ie.frame(xxxx,xxxx).text_field(:name,'miseCode').set('1234')"


On Wed, Oct 8, 2008 at 8:40 AM, wesley chen <cjq...@gmail.com> wrote:
Weird, I can make it with your code.





--
Regards,
Edward Deng

Gustavo Labbate Godoy

unread,
Oct 9, 2008, 8:00:21 AM10/9/08
to watir-...@googlegroups.com
Hi,

Your input type is hidden.
Instead using text_field, use hidden

ie.hidden(xxx,"xxx").set("yyy")

I hope this helps

Gustavo Godoy
Brasil

Željko Filipin

unread,
Oct 9, 2008, 11:12:11 AM10/9/08
to watir-...@googlegroups.com
On Wed, Oct 8, 2008 at 8:34 PM, Fatema Karim <fate...@gmail.com> wrote:
> but now when it clicks on the menu it opens up a tiny window inside span where I need to click a button but that does not seem to work properly :( 

Fatema,

This tells us not enough to help you. Can you be more specific?

Željko
--
http://watirpodcast.com/bret-pettichord-on-firewatir/

Fatema Karim

unread,
Oct 9, 2008, 1:25:19 PM10/9/08
to watir-...@googlegroups.com

Hi Željko, 

This worked when I have tried the following:

$ie.frame(:id, "frameID").table(:id, 'tableID').link(:id, /linkID/).click 

Thanks. 

Reply all
Reply to author
Forward
0 new messages