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

MouseClick doesn't work under different browsers

3 Answers 132 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Volodymyr
Top achievements
Rank 1
Volodymyr asked on 04 Dec 2014, 04:49 PM
Hi all,

We have faced with issue that  MouseClick doesn't work at all in our framework under different browsers for different controls. The following construction doesn't even make the mouse move

HtmlAnchor FindButton = Manager.ActiveBrowser.Find.ById<HtmlAnchor>("ctl00_cphBody_btnLogin");
FindButton.MouseClick(MouseClickType.LeftClick);

If we create a new test without our automation framework using pure Telerik construction the same lines works correctly. If the use the same test using pure Telerik construction but put it in our framework solution - the desktop mouse doesn't work at all. The app.config with the same webaii setting was used in both scenario, and the same test under same browser.

I have performed some debugging of Telerik libraries and found that were is difference how the Win32.Point object is initialized for the same button using same browser position (Please see the screenshot for details.) unfortunatelly i was not to debug further.
inputData = new Input[1];
InitializeMouseEvent(ref inputData[0], num, num2, 0x8002, true);

You can notice that in mouse not working situation the dwExtraInfo field for the KEYBDINPUT class is set to 0, in working situtation this value is initialized to 32771. If i modify the dwExtraInfo field in the KEYBDINPUT class and set it value to 32771 from 0, the 37771 value in the MOUSEINPUT class time field wil be initialized to 32771 as well.

If i modify the dwExtraInfo in the KEYBDINPUT class  in case mouse was working correctly and set it value to
0 and when to 37771  - same value is also assigned to the dwFlags field will be initialized to 32771. 

So it seems that in those 2 situations the Input class is constructed differently internally, with dwExtraInfo int pointer referencing to different fields. This is the only clue that i have why the desktop mouse is not working

Telerik version: 2014.3.903.0

3 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 09 Dec 2014, 03:50 PM
Hello Volodymyt,

In order to assist you best we need more detailed information.

1. What do you mean by "when we put it in our framework" it does not work? What is your framework?

2. What is exactly the issue? Does it click on a wrong place? Does it click at all?

3. Can you capture a screen recording of the test running, so we can better understand the exact scneario? Jing is a good free screen recorder for up to 5 minutes of recording time.

4. Is there any chance we can get your project and access to your application so we can reproduce the issue?

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Volodymyr
Top achievements
Rank 1
answered on 10 Dec 2014, 03:38 PM
Hello Boyan,

1. Sorry for confusion I meant : when I put sample test in our internal solution (compared to writing same test from scratch)
2. Mouse simply doesn't click anywhere. System mouse doesn't move at all it just remain at the same position, where it was before MouseClick(MouseClickType.LeftClick) and the httml wrapper is not null
3. Well it reproducible for every HtmlControl even on our login screen. I'm not sure why you will needing these since you will not be able to see anything. The some issue is reproducible on other team members. Seem like some kind of configuration issues but  cant' figure out it.
4. Unfortunately I'm not able to do that ((

Best regards,
Volodymyr
0
Boyan Boev
Telerik team
answered on 15 Dec 2014, 09:07 AM
Hi Volodymyr,

Could you please try reproducing this against some public site where you can point us. We need a reliable repro for this so we can assist you best.

Hope to hear from you soon.

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