Unable to use MouseClick on HtmlButton in IE9

3 posts, 0 answers
  1. Nahla
    Nahla avatar
    7 posts
    Member since:
    Jun 2013

    Posted 12 Aug 2013 Link to this post

    Hi, my script is having an issue using MouseClick on HtmlButton in IE9.  The script runs without clicking on the button.  I have tried several things such as Mouseclick (MouseClickType.LeftClick). I have also tried using MouseClick (MouseClickType.LeftClick, X, Y).  have also tried to use Manager.Current.ActiveBrowser.Actions.Click (Element).   The click is not taking place.
    It only clicks when using the click () method, however, the browser hangs.
    After the click is performed an IEdialog suppose to display.

    Here is some code snippet:
    public HtmlButton AddButton { get {return Get<HtmlButton>("name=addreport");}}

    Script contains:
    Page.AddButton.MouseClick();   // where page is the current active browser.

    Thanks in advance.
  2. Nahla
    Nahla avatar
    7 posts
    Member since:
    Jun 2013

    Posted 13 Aug 2013 Link to this post

    Forgot to mention that I am using Telerik Testing Framework 2012.2.1527.

  3. Mario
    Mario avatar
    8 posts

    Posted 15 Aug 2013 Link to this post

    Hello Nahla,

    Thank you for contacting Telerik Support.

    One possibility is that this element which is located by your find logic is located somewhere off the screen when Test Studio attempts to make a real mouse click (DOM-click method would still work). To rule out this possibility, please try to add a MouseHover() action followed by a long delay (eg. System.Threading.Thread.Sleep(5000)) where you would normally make this MouseClick. If you find that the mouse hovers over a corner of the browser (instead of the intended button), then the found element is off the page and you may need to refine your find logic.

    If my suggestion above doesn't help, please provide us with the means to reproduce the issue. A copy of your test along with access to the application would allow us to do so. If direct access is not possible (eg. app is local and/or private), we can instead attempt to "simulate" your app through a captured Fiddler trace which you can also attach to this ticket in a zip. If you are unfamiliar with how to create one, 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.

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