On Oct 19, 12:17 am, Naveen <[email protected]> wrote:
> Hello,
>
> Using 'onclick' ,tried the following method on the link (anchor tag) which
> will display new dropwdown menu window,
> observed that the element is located (yellow color is displaying on that
> tab) but new drop down menu is not displayed.
>
> $ie.div(:id,"NetworkAnalysisTabPanel").div(:index,1).div(:index,1).ul(:index,1).li(:index,1).links.each
>
> do |link|
>
>    link.fire_event("onclick")
>
>   end
>
> Note :  observed from the fire bug that,upon clicking on the link ' new div
> tag is generated '

The key to this is figuring out what events the control is looking
for.  That is not always obvious from the HTML since that stuff can be
buried in other resources (javascript, css, etc)

In this case, based on finding a sample site that has code with the
same class names, I believe that control is lookiing for
'onmousedown'  and firing that event is the key to getting the menu to
appear.

For details, see the answer to this SO question you posted
http://stackoverflow.com/questions/7991154/how-to-click-a-strange-link-looks-like-button-in-watir

BTW this is a good example of why we constantly ask people if there is
a site where we can try interacting with the control being used.   If
you had done a little googling and found it for us (instead of me
having to go find it) then myself or one of many other people here,
via experimenting with that site, could likely have had your answer
for you a few weeks ago.

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

Reply via email to