Using Selenium and Milonic

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Shap5202
Super Advanced
Super Advanced
Posts: 62
Joined: Thu Sep 29, 2005 2:36 pm

Using Selenium and Milonic

Post by Shap5202 »

We currently have a suite of tests written for an application called Selenium if any of you have used it (http://selenium.thoughtworks.com/index.html)

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?

THanks
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

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.

Cheers,
Andy
Shap5202
Super Advanced
Super Advanced
Posts: 62
Joined: Thu Sep 29, 2005 2:36 pm

Post by Shap5202 »

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[@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 :)
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

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.

Regards,
Andy
Shap5202
Super Advanced
Super Advanced
Posts: 62
Joined: Thu Sep 29, 2005 2:36 pm

Post by Shap5202 »

Using v5.732

<code>
with(milonic=new menuname("Main")){
overflow="scroll";
style=mainStyle;
style.clickfunction="view.handlePleaseWaitMessage();";
top=66;
left=56;
aI("showmenu=All;text=All;");
aI("showmenu=Customer;text=Customer;");
aI("text=Account Load;url=/some/urlHere.html");
....
}

</code>

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[@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?
nobrains
Beginner
Beginner
Posts: 1
Joined: Tue May 26, 2009 10:14 am

Re: Using Selenium and Milonic

Post by nobrains »

any updates on this?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Re: Using Selenium and Milonic

Post by John »

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