We have already fixed this bug for Beta2.
I uploaded a daily build (trunk version) for you to try it:
http://www.ranorex.com/download/RanorexRecorder-1.2.0-trunk.exe
The Recorder generates the following C# code if you change the resolution:
Code: click into code to enlarge
// Find child element by Role=Indicator, Name=Position, ClassName=msctls_trackbar32
element = formElement.FindChild(Role.Indicator, "Position", "msctls_trackbar32");
Mouse.MoveToElement(element, new Point(4, 3), 1583);
point = Mouse.Position;
Mouse.ButtonDown(MouseButtonType.LeftButton);
Mouse.Move(new Point(point.X+-45, point.Y+7), 1265);
Mouse.ButtonUp(MouseButtonType.LeftButton);
First we search the position button of the trackbar:
Code: click into code to enlarge
element = formElement.FindChild(Role.Indicator, "Position", "msctls_trackbar32");
Then we move the mouse to the element and press the left mouse button:
Code: click into code to enlarge
Mouse.MoveToElement(element, new Point(4, 3), 1583);
Mouse.ButtonDown(MouseButtonType.LeftButton);
4 and 3 are the relative positions of the mouse within the element (you pressed the mouse on x=4,y=3)
1583 is the move time in milliseconds
At last we move the mouse and release the button:
Code: click into code to enlarge
Mouse.Move(new Point(point.X+-45, point.Y+7), 1265);
Mouse.ButtonUp(MouseButtonType.LeftButton);
Hope it works for you
Jenö
Ranorex Team |