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
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