asp:menu navigation

5 posts, 0 answers
  1. Andrew
    Andrew avatar
    125 posts
    Member since:
    Sep 2008

    Posted 26 Aug 2011 Link to this post

    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?
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 29 Aug 2011 Link to this post

    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!
  3. Andrew
    Andrew avatar
    125 posts
    Member since:
    Sep 2008

    Posted 29 Aug 2011 Link to this post

    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?


  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 31 Aug 2011 Link to this post

    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!
  5. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 31 Aug 2011 Link to this post

    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!
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!