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!
Handling of Mouse movements through Ranorex?
-
- Posts: 2
- Joined: Wed Nov 17, 2010 11:23 pm
Re: Handling of Mouse movements through Ranorex?
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.
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...
Ciege...
-
- Posts: 2
- Joined: Wed Nov 17, 2010 11:23 pm
Re: Handling of Mouse movements through Ranorex?
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!
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!
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: Handling of Mouse movements through Ranorex?
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.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Handling of Mouse movements through Ranorex?
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
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