Detecting animating

Ranorex Spy, Recorder, and Studio.
Thor.Irgens
Posts: 6
Joined: Tue Sep 20, 2016 10:01 am

Detecting animating

Post by Thor.Irgens » Tue Feb 27, 2018 10:03 am

Hi,

Is there any way to detect if an animation is running on a UI element? I have a button which has an "I am working on it" animation and I would like to detect when it is done instead of just putting in a delay.

qwertzu
Posts: 180
Joined: Wed Jan 25, 2017 11:08 am

Re: Detecting animating

Post by qwertzu » Thu Mar 01, 2018 2:31 pm

Hi,

Unfortunately, there doesnt exist an action to detect an animation.
If there is no attribute which states that the animation is currently running, you could only try to create two screensots, one after the other and compare them. If the screenshots are different, the animation is running.

regards, qwertzu

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Detecting animating

Post by krstcs » Thu Mar 01, 2018 4:53 pm

The screenshot capture is probably the best way to do this, as qwertzu said.

The only issue I would bring up is one of timing. Ranorex is not a performance test tool, so it isn't really setup to do some of these very timing-dependent types of things. Just be aware that there may be times when the test doesn't detect a change because of timing (for example, the updates didn't happen in the time frame of the screenshot captures, or something like that). So, you will probably want to make sure that your code accounts for those timing issues.
Shortcuts usually aren't...