Big delay between play and pause

Ranorex Spy, Recorder, and Studio.
damien
Posts: 17
Joined: Wed Jun 24, 2020 8:17 am

Big delay between play and pause

Post by damien » Wed Dec 16, 2020 9:21 am

Hello,

I have here an application with the same button for playing and pausing the video.

I would like to stress my application by fast clicking on that button for several times.

The issue that I have is that Ranorex takes a long time to detect my play button (when the video is playing and not in pause).
I expect that the issue is related to the fact that there are 2 different designs of that button ("Play button" & "Pause button) depending on the status of the video (play or pause). And that way, Ranorex doesn't recognize the 2nd design, that's why it takes longer to click at that moment.

My question is then: how can I fix this ?
* Do I have the possibility to have 2 distincts path for the same button (1 path for each design?
* I could also use the coordinates (x,y) to make a left click with the mouse, but in case the screen resolution of a PC is different, will the coordinates still be the same ?

Thanks in advance for your support,
Damien

User avatar
Stub
Posts: 440
Joined: Fri Jul 15, 2016 1:35 pm

Re: Big delay between play and pause

Post by Stub » Mon Jan 04, 2021 10:11 am

You might be able to temporarily cache the Adapter object in your code for rapid re-use, rather than going via the repository object. i.e. access the repository object once (which may be slow) then re-use the Adapter. I've done this when referencing a UI element via the repository was horrendously slow for us.

Separate RxPaths for the button will depend on identifying features in the attributes that Rx can read. Or maybe you can use a rawimage ID to help here? We've done something along these lines with rawimage, which seems sufficient for our needs so far.

You could work out the coordinates of the button the first time, similar to caching the Adapter mentioned above, and then just click within that area. We always set the desktop resolution to 100% scaling to avoid that introducing problems, but calculating an offset from something we've located on-screen via an RxPath to a repository object is quite a common solution here when I don't want to worry about a dialog/control/element appearing somewhere I am not in control of.