RadMenuItem.MouseHover() issue in Firefox

6 posts, 0 answers
  1. LQKerry
    LQKerry avatar
    4 posts
    Member since:
    May 2013

    Posted 27 Jun 2013 Link to this post

    I am still relatively new to working with the Telerik Testing Framework so I am hoping there is an easy fix or something to account for to get around this issue. First I will describe my environment:

    FireFox 22.0 (with Telerik Testing Framework - Firefox Http Client 2012.2.1205.0 add on)
    MSTest Unit Test Framework (Visual Studio 2012)
    Telerik Testing Framework 2012.2 1420
    OS Windows 7

    I have 2 TestMethods that run fine in IE9 but not in Firefox 22. The two scripts log a user into the application and then perform checks or actions on menu items. The menu is a RadMenu so I am using the RadMenu wrapper class to interact with the menu in the browsers. The script will successfully perform MouseHover() actions on the menu prior to logging a user in. But after the user logs in, then when the script performs a MouseHover() on RadMenuItems the mouse icon moves to the menu item on the page but none of the expected hover over actions happen in the browser (the menu item does not highlight, the child menu does not open/display). It puzzles me that all seems to work prior to logging a user in but not after logging a user in especially when you can visually see the mouse icon move to the desired menu item.

    Any help would be greatly appreciated. Please let me know if my explanation is not clear or if you would like more details.

    Thanks!

  2. Mario
    Admin
    Mario avatar
    8 posts

    Posted 02 Jul 2013 Link to this post

    Hello Kerry,

    Thank you for contacting Telerik Support.

    I am sorry to say that the behavior you describe does not fit that of any known issue. In order to investigate further, please provide us with the means to reproduce the same behavior locally. For instance with a sample of your code along with access to your application or one which is publicly accessible and still exhibits the issue (eg. Telerik RadMenu demo). If the issue is specific to your application and providing us with direct access will not be possible (eg. app is local and/or private), please record and attach a Fiddler trace of this part of your application for us to "simulate" your environment and recreate the scenario. If you are unfamiliar with how to do so, this link will provide you with step-by-step instructions for download and use. Alongside the previous instructions, please make sure to enable the 'Store binaries' and 'Decrypt HTTPS traffic' options prior to starting the capture (see image). Thank you for helping us advise you.

    Regards,
    Mario
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. LQKerry
    LQKerry avatar
    4 posts
    Member since:
    May 2013

    Posted 02 Jul 2013 Link to this post

    I created a new VS Unit Test project and added a Telerik VS Unit test class to the project. I then created a short script (details below) that interacts with the Telerik RadMenu Demo pages. I verified that it works in IE without issue. Then I recorded my runs of the script in Firefox with Jing. (http://www.screencast.com/t/QXHlZBBD) In this clip it shows the run of the script in Firefox 22 about 5 different times and about three of the times the script fails to run, in fact, one of the times an exception is thrown from within the ArtOfTest library.

    I used what I feel is an excessive amount of wait commands trying to make sure everything is ready before performing any actions.

    Please let me know what the different between IE and Firefox may be. Both browsers were manually configured per the instructions on the Test Studio documentation.

    SCRIPT:
       [TestMethod]
            public void SampleWebAiiTest()
            {
                // Launch a browser instance
                Manager.LaunchNewBrowser(BrowserType.FireFox);
     
                // Navigate the active browser to www.wikipedia.org
                ActiveBrowser.NavigateTo("http://demos.telerik.com/aspnet-ajax/menu/examples/overview/defaultcs.aspx");
     
                HtmlFindExpression menu1Expr = new HtmlFindExpression("id=?RadMenu1");
                RadMenu menu1 = ActiveBrowser.Find.ByExpression<RadMenu>(menu1Expr);
                menu1.Wait.ForExists();
     
                menu1.FindItemByText("Format").MouseHover();
     
                System.Threading.Thread.Sleep(5000);
     
                HtmlFindExpression nextButtonExpr = new HtmlFindExpression("id=?HeaderControl_Next");
                RadButton nextButton = ActiveBrowser.Find.ByExpression<RadButton>(nextButtonExpr);
                nextButton.Wait.ForExists();
                nextButton.MouseClick();
                ActiveBrowser.WaitUntilReady();
     
                HtmlFindExpression prevButtonExpr = new HtmlFindExpression("id=?HeaderControl_Prev");
                RadButton prevButton = ActiveBrowser.Find.ByExpression<RadButton>(prevButtonExpr);
                prevButton.Wait.ForExists();
                prevButton.MouseClick();
                ActiveBrowser.WaitUntilReady();
     
                ActiveBrowser.RefreshDomTree();
     
                menu1.Wait.ForExists();
     
                menu1.FindItemByText("Edit").MouseHover();
     
                System.Threading.Thread.Sleep(5000);
            }

  4. Mario
    Admin
    Mario avatar
    8 posts

    Posted 04 Jul 2013 Link to this post

    Hello Kerry,

    Thank you kindly for the public sample. Firefox does generally execute a little slower compared to IE, I found the code below to be more reliable than your original example as far as waits are concerned. I do however realize that it is still not perfect and so I am continuing to look into the behavior, please stand by for another update.

    Manager.LaunchNewBrowser(BrowserType.FireFox);
      
    HtmlFindExpression menu1Expr = new HtmlFindExpression("id=?RadMenu1");
    ActiveBrowser.WaitForElement(menu1Expr,20000,false);
    RadMenu menu1 = ActiveBrowser.Find.ByExpression<RadMenu>(menu1Expr);
                 
                 
    menu1.FindItemByText("Format").MouseHover();
    System.Threading.Thread.Sleep(3000);
      
    HtmlFindExpression nextButtonExpr = new HtmlFindExpression("id=?HeaderControl_Next");
    ActiveBrowser.WaitForElement(nextButtonExpr,20000,false);
    RadButton nextButton = ActiveBrowser.Find.ByExpression<RadButton>(nextButtonExpr);
    nextButton.MouseClick();
     
    HtmlFindExpression prevButtonExpr = new HtmlFindExpression("id=?HeaderControl_Prev");
    ActiveBrowser.WaitForElement(prevButtonExpr,20000,false);
    RadButton prevButton = ActiveBrowser.Find.ByExpression<RadButton>(prevButtonExpr);
    prevButton.MouseClick();
     
    ActiveBrowser.WaitForElement(menu1Expr,20000,false);
    menu1.FindItemByText("Edit").MouseHover();
    System.Threading.Thread.Sleep(3000);


    Regards,
    Mario
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  5. LQKerry
    LQKerry avatar
    4 posts
    Member since:
    May 2013

    Posted 08 Jul 2013 Link to this post

    Thanks for the update and the info. I look forward to hearing any further details you may be able to provide.
  6. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 11 Jul 2013 Link to this post

    Hello Kerry,

    We will update this ticket as soon as we have any further details.

    Thank you for your understanding and patience.

    Regards,
    Boyan Boev
    Telerik
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top