Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:30

Using Selenium and Milonic

Poster: Shap5202
Dated: Thursday September 29 2005 - 16:21:13 BST

We currently have a suite of tests written for an application called Selenium if any of you have used it (

Unfortunately, with the upgrade to Milonic menus, it broke all ours tests and they relied on links you can 'click' via xpath.

Is there a way to get xpath to work with the Milonic menus?


Poster: Andy
Dated: Thursday October 6 2005 - 11:33:29 BST


Do you have a URL that we can see?

It helps to be able to see the problem so that we can see how to fix it.


Poster: Shap5202
Dated: Friday October 7 2005 - 14:21:52 BST

Unfortunately not, intranet site.

Maybe this will help a little bit more...

normally in a test, you would have a command like:
<tr><td>clickAndWait</td><td>//a[ __at__ id='gotoThisPage']</td><td>&nbsp;</td></tr>

this would search the rendered page for an <A> tag with the id of 'gotoThisPage'and click it thereby going to the specified new page.
Now with our links in Milonic menus, there is no longer an <A> to click.

We're looking at writing our own extensions for the testing program to take a menu name and link text and performing to 'click' ourselves. But wasn't sure if there was another way to go about this.

Hopefully that helped a little, but probably not :)

Poster: Andy
Dated: Friday October 7 2005 - 18:01:37 BST

Which version of the menu are you running?

Later versions do actually use <A> tags for the menu items, so these should show up. Unless you are testing for the raw HTML, instead of the full HTML that includes the rendered menu.

What would help is if you could post something to the Internet, I know we keep asking for this but it's the only way we can advise.


Poster: Shap5202
Dated: Friday October 7 2005 - 19:48:44 BST

Using v5.732

with(milonic=new menuname("Main")){
aI("text=Account Load;url=/some/urlHere.html");


So that is a simplified and obviously simple menu we have. So say I wanted to make Selenium click the link that says Account Load.

previously I could use xpath to reference it by saying //a[ __at__ id='Account Load'] where there was a link with that id.

It does this against a completely rendered html page. It uses xpath to traverse the DOM of the page for the element that matches the specified text. But (as far as I could tell) the Milonic menu didnt fit well into that model where we would know what id's to look for.

That help at all?

Re: Using Selenium and Milonic

Poster: nobrains
Dated: Tuesday May 26 2009 - 10:17:56 BST

any updates on this?

Re: Using Selenium and Milonic

Poster: John
Dated: Saturday June 13 2009 - 2:10:08 BST

Your menu code is way down-level, and no longer supported. Please update to the current 5.822 and see if that helps.