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

Browser does not intercept the control of the mouse

3 Answers 13 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Max
Top achievements
Rank 1
Max asked on 09 Apr 2017, 09:31 AM
During the test, the browser does not intercept the control of the mouse. The browser opens, navigation to the page occurs, text fields are filled in, but the element is not clicked. The mouse cursor does not even go into the browser. In this case, no error occurs, the framework thinks that the click has happened. The problem only appeared after the transition from 2016.3.928.0 to 2017.1.0329

3 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 12 Apr 2017, 10:46 AM
Hello Max,

Thanks for contacting us. 

As far as I understand you are automating a Silverlight application using the Telerik Testing Framework. Please correct me if this assumption is not correct. 

From the description of the observed issue I guess that the click needs to be simulated as real user behavior. What is the code you have used to perform the click? Please if give a try to use the Desktop Manager Class in case you haven't already. 

I hope to hear from you soon! 

Regards,
Elena Tsvetkova
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Max
Top achievements
Rank 1
answered on 08 Jan 2018, 10:52 AM

Hello. Thanks for the answer.
The above problem is no longer relevant, however, a similar problem has appeared.

The problem is floating. When I call method Click() from ArtOfTest.WebAii.Silverlight.UserInteraction, the cursor is hovered over the element, but it does not click. I looked in the source and found the next implementation.

public void Click(MouseClickType clickType)
        {
            int width = 0;
            if ((NativeMethods.User32.GetWindowLong(this._element.Application.ContentWindow.Handle, -20) & 4194304) != 0)
            {
                NativeMethods.RECT rECT = new NativeMethods.RECT();
                NativeMethods.User32.GetWindowRect(this._element.Application.ContentWindow.Handle, ref rECT);
                width -= rECT.Width;
            }
            this.Click(clickType, new Point(width, 0), OffsetReference.AbsoluteCenter);
        }

When I replaced method Click() to Click(MouseClickType.LeftClick, 0, 0, OffsetReference.AbsoluteCenter), the error disappeared.

Probably parameter "width" is incorrectly calculated.
Please, can describe how method Click(MouseClickType clickType) should work and what are these magic numbers?
Thank you.

0
Elena
Telerik team
answered on 11 Jan 2018, 08:46 AM
Hello Max,

Thanks for getting back. 

Depending on the application specifics you might need to apply a click method with extended arguments as you have tried that yourself already. Without access to the application under test and the exact code used I could not determine what the reason could be for the observed failure. 

Here you could find all Click methods exposed along with the arguments they require. I hope this will be helpful to you. 

Thank you! 

Regards,
Elena Tsvetkova
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Max
Top achievements
Rank 1
Answers by
Elena
Telerik team
Max
Top achievements
Rank 1
Share this question
or