Handling of Mouse movements through Ranorex? : Automation Tools

Handling of Mouse movements through Ranorex?

Ranorex Spy, Recorder, and Studio.

Handling of Mouse movements through Ranorex?

Postby saurabh0308 » Thu Nov 18, 2010 12:26 am

Hi,

We are exploring Ranorex tool for window based application.
We are facing issue due to usage of mouse click function which uses the coordinate specific to the tester system.

Script executed on different systems (environment) fail due to the mouse coordinate values.

We are in urgent need and looking for some suggestions ASAP.

Please respond to this at earliest which help us in designing the general script which can be executed on different environment.

Thanks!
saurabh0308
 
Posts: 2
Joined: Thu Nov 18, 2010 12:23 am

Re: Handling of Mouse movements through Ranorex?

Postby Ciege » Thu Nov 18, 2010 12:32 am

Can you post your code you are having problems with?

Mouse movements and clicks in Ranorex should *not* be coordinate based relative to the desktop.

I have lots of code that moves the mouse and clicks on objects through Ranorex that translates just fine from box to box regardless of screen resolution.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...
User avatar
Ciege
 
Posts: 965
Joined: Thu Oct 16, 2008 7:46 pm
Location: Arizona, USA

Re: Handling of Mouse movements through Ranorex?

Postby saurabh0308 » Thu Nov 18, 2010 5:56 am

Issue facing: For action of mouse click, code generates a method which uses screen coordinate......which is dependent on single system and when executing on different boxes gives error.

Sample code1: Below is the action performed on system for opening command prompt on windows and running few commands.

public static void Start()
{
Mouse.DefaultMoveTime = 300;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.0;

Report.Info("Mouse Left Click item 'MenuBarExplorer.ButtonStart' at 25;17.");
repo.MenuBarExplorer.ButtonStart.Click("25;17");
Delay.Milliseconds(490);
Report.Info("Mouse Left Click item 'HostDUALCORE8.HostDUALCORE8' at 97;650.");
repo.HostDUALCORE8.HostDUALCORE8.Click("97;650");
Delay.Milliseconds(1150);
Report.Info("Key sequence 'cmd{Return}'.");
Keyboard.Press("cmd{Return}");
Delay.Milliseconds(1560);
Report.Info("Key sequence 'cd\\{Return}'.");
Keyboard.Press("cd\\{Return}");


Sample code 2: Action perform on application interface

Report.Info("Mouse Left Click item 'HostDUALCORE8.HostDUALCORE8' at 140;366.");
repo.HostDUALCORE8.HostDUALCORE8.Click("140;366", 209);

Please suggest how we can replace this system dependency and using the method which uses page element or id as arguement in click method.

Thanks!
saurabh0308
 
Posts: 2
Joined: Thu Nov 18, 2010 12:23 am

Re: Handling of Mouse movements through Ranorex?

Postby artur_gadomski » Thu Nov 18, 2010 9:30 am

Try removing coordinates from Click methods. That should work for StartButton, but I think repo.HostDUALCORE8.HostDUALCORE8 might mean that your application is not recognized.
User avatar
artur_gadomski
 
Posts: 125
Joined: Mon Jul 19, 2010 7:55 am
Location: Copenhagen, Denmark

Re: Handling of Mouse movements through Ranorex?

Postby Support Team » Thu Nov 18, 2010 4:16 pm

Hi,

Instead of using the coordinates you can use locations like "Center, Center left" and so on.
Which errors are reported by Ranorex? Also try to compare the RxPath from both machines if the are the same.

Thanks in advance.

Regards,
Peter
Ranorex Team
User avatar
Support Team
Site Admin
 
Posts: 4843
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation Tools

Who is online

Users browsing this forum: No registered users and 0 guests