Page 1 of 1

Evaluating Ranorex - Drag Move Recording

Posted: Fri May 13, 2016 12:32 pm
by jules.graus
Dear forumusers and Ranorex,

I just started evaluating Ranorex to test our company's applications. One major application we have is built in flash action script 3. I created my first test case to test the application. And i have successfully created a recording module called login. That one works fine.
But now i've created a second recording in which i click the mouse, drag a sine wave and release the mouse. Recording works, but when i play it back it does click, drags directly to the end point instead of drawing the sine wave and the releases the mouse.
How can i make sure it does not go from start point to end point directly, but in a way it draws that sine wave?

Also i've found that sometimes the browser loads the page containing our flash application a bit slow and that when it's slow, ranorex continues clicking and typing around blindly. How can i make sure it only continues doing the testing after the browsers webpage is loaded completely?

Kind Regards,

Jules.

Re: Evaluating Ranorex - Drag Move Recording

Posted: Tue May 17, 2016 3:25 pm
by krstcs
You can manually add mouse.move actions anywhere in your recording. You can either use a specific element as the location, or you can use relative location for the main graph element.

As for waiting for things to load, this is a common problem with automation. Remember, the computer (and thus Ranorex tests) will try to do the next step as quickly as possible, without waiting for what a human user would usually wait for, like a page to finish loading.

There are a three primary things you can do to help with this.

1. Static delays - just add a Delay action in your test right before the step that is going too fast. This is, however, not the best way.
2. WaitFor.Exists() - this will cause Ranorex to wait until the provided element exists. This sometimes doesn't work without the 3rd thing though...
3. Add "and @state='complete'" to your main /dom element in the repository. This will force Ranorex to search for the dom until the browser actually shows it as complete. Using this with WaitFor.Exists() is the best way to handle the type of delays you are seeing, especially in web testing.

Re: Evaluating Ranorex - Drag Move Recording

Posted: Tue May 17, 2016 3:47 pm
by Support Team
Hi Jules,

Thank you for your post.

In order to record a mouse move, you need to enable the hotkeys during the recording. By moving the mouse to the object and pressing the hotkey "M", you are able to record your mouse move.
EnableHotkeys.png
Please note that the cursor will only move from point A (current position) to point B (recorded position). That means that it is quite impossible to achieve your intention.

Concerning your second question
To ensure that your webpage is loaded correctly before the test starts, you could use a "WaitFor"-Action on any element which is loaded at last.
WaitForAction.png
I hope I could answer your questions.

Kind regards,
Matthias