[Wtr-general] javascript Menu
Balakrishna
balakrishna.venkatappa at ionidea.com
Wed Jan 3 11:25:45 EST 2007
Hi Nathan :
Thanks for wonderful explanation. I could resolve the issue.
Thanks
Balu
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Nathan
Sent: Tuesday, January 02, 2007 6:05 PM
To: wtr-general at rubyforge.org
Subject: Re: [Wtr-general] javascript Menu
So I will assume that you are talking about a menu that when your cursor is
over it, the menu drops down or appears, and then you can click on a link,
is this correct? Here is a brief code snippet from one of my scripts. I
will explain it in detail.
$objWatirBrowser.image(:id, "menu_SearchInventory").fireEvent("onMouseOver")
# Mouse over the menu
$objWatirBrowser.textField(:id,
"nav_new_vsZipCode").set($objProperties.strCurrentZipCode) # Set the zip
code
$objWatirBrowser.link(:id, "nav_new_vsZipCode_a").click # Click on the Next
image
$objWatirBrowser is an instance or object of IE. You probably have
something similar already. The image I am referencing on the first line is
an image that represents my menu, maybe you have a div instead or something
else, then change it to what you need. The fireEvent method after that
causes the browser to think that there is a mouse cursor over the menu.
This results in making the menu appear or drop down.
On the second line I fill in a field that is located on my menu. This is
pretty atypical (not normal), but you can do that if you need to.
On the third line I am clicking on a link that is in my menu again. I hope
that this may help you somewhat in answering your question. Basically the
steps I've taken here are:
1. Mouse Over the menu to make it appear
2. Enter data into a text field on the menu
3. Click on a link on the menu
Nathan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5973&messageID=16724#16724
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
More information about the Wtr-general
mailing list