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

Unable to use MouseClick on HtmlButton in IE9

2 Answers 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nahla
Top achievements
Rank 1
Nahla asked on 13 Aug 2013, 02:14 AM
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 Answers, 1 is accepted

Sort by
0
Nahla
Top achievements
Rank 1
answered on 13 Aug 2013, 07:30 PM
Forgot to mention that I am using Telerik Testing Framework 2012.2.1527.

Thanks
0
Mario
Telerik team
answered on 15 Aug 2013, 09:54 PM
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.

Regards,
Mario
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Nahla
Top achievements
Rank 1
Answers by
Nahla
Top achievements
Rank 1
Mario
Telerik team
Share this question
or