This is a migrated thread and some comments may be shown as answers.

asp:menu navigation

4 Answers 15 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrew
Top achievements
Rank 1
Veteran
Andrew asked on 26 Aug 2011, 06:00 PM
I want to know what is the best way to navigate the menus manualy.

this is what I am doing now:
//Menu Navigation
HtmlAnchor htmlAnchorOrders = HtmlAnchor_GetByContent("Orders");
htmlAnchorOrders.MouseHover();
 
HtmlAnchor htmlAnchorListOrders = HtmlAnchor_GetByContent("List Orders");
htmlAnchorListOrders.Click();

Basicly I hover over the item and then click the subitem, but this will sometimes time out.

is there a better way of clicking on sub menu items, can I force a click on the sub menu item without selecting the parent menu item?

4 Answers, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 29 Aug 2011, 06:03 PM
Hello Andrew,
    an ASP .Net navigation menu is unlikely to be generated on-demand. This means that the HTML anchor you want to click actually exists as part of the page's DOM even before you hover over the menu. This means that that this code:
HtmlAnchor htmlAnchorListOrders = HtmlAnchor_GetByContent("List Orders");
htmlAnchorListOrders.Click();
will probably execute successfully even before the HoverOver logic.

At what point is the test failing exactly? I would suggest modifying the code to improve its reliability:
HtmlAnchor htmlAnchorOrders = HtmlAnchor_GetByContent("Orders");
htmlAnchorOrder.Wait.ForExists(10000);
htmlAnchorOrders.MouseHover();
  
HtmlAnchor htmlAnchorListOrders = HtmlAnchor_GetByContent("List Orders");
htmlAnchorListOrders.Wait.ForExists(10000);
htmlAnchorListOrders.Click();

You can try manually invoking the hover-over event like this:
htmlAnchorOrders.InvokeEvent(ArtOfTest.WebAii.Core.ScriptEventType.OnMouseOver);
but this may or may not work depending on your app's implementation.

All the best,
Stoich
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Andrew
Top achievements
Rank 1
Veteran
answered on 29 Aug 2011, 06:12 PM
Thanks for your help,

I found the issue, and it was my fault...

we have some precanned methods for doing things and most of the time the item will be visable, but in this case it was not and out method had a waitfor visable call on it.

Thanks for your help..

by the way do you have any info on if/when we might hear some info on a load testing features?


0
Stoich
Telerik team
answered on 31 Aug 2011, 04:30 PM
Hi Andrew,
   real “load testing” i.e. can my server handle N simultaneous users is something that is going to be implemented as part of Test Studio in the near future.

 However, our next major release (expected in about a week) will feature tools for performance testing i.e. where are the bottlenecks of my application).

Check out Test Studio's road map for more info:
http://www.telerik.com/automated-testing-tools/products/roadmap.aspx

Greetings,
Stoich
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Stoich
Telerik team
answered on 31 Aug 2011, 06:07 PM
Hello Andrew,

     I'm very sorry - I made a mistake in my last post:

real “load testing” i.e. can my server handle N simultaneous users is something that is going to be implemented as part of Test Studio in the near future.

The above-described functionality is something that is NOT going  to be implemented in the near future and is currently NOT on the product's road map. 

Kind regards,
Stoich
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
Tags
General Discussions
Asked by
Andrew
Top achievements
Rank 1
Veteran
Answers by
Stoich
Telerik team
Andrew
Top achievements
Rank 1
Veteran
Share this question
or