Workaround for when network is slow

Best practices, code snippets for common functionality, examples, and guidelines.
ModelingPaul
Posts: 13
Joined: Thu Apr 05, 2018 10:46 pm

Workaround for when network is slow

Post by ModelingPaul » Fri Apr 27, 2018 10:02 pm

I am running on Windows 10 and connecting to a server that sometimes is slow opening files for me to do validation on in Windows Explorer. What I have been doing is just putting in a delay of 3s or 5s but sometimes that is not enough and I have to wait even 20 seconds for a file to appear. By that time my next action step is executing and my replay will fail.

Is there a better way than to just put in a delay? Can I add anything after the following Action so that it knows to wait unto a certain time while looking for the corresponding editor to appear with the correctly labeled tab?

Mouse DoublClick Left Relative UIImage1

Any ideas so that this is bulletproof no matter how long the network takes to load the file? I am afraid there is no easy way and I don't feel like putting in a 30 second delay for each file to load when 98% of the time it takes 1-2 seconds.

Edit: I forgot to mention that I am using 8.1.1.

Thanks!

ModelingPaul
Posts: 13
Joined: Thu Apr 05, 2018 10:46 pm

Re: Workaround for when network is slow

Post by ModelingPaul » Fri Apr 27, 2018 10:56 pm

So it looks like a WaitFor Exists seems to be my easiest approach. The problem I am having is when I try to Track the tab I am waiting to exist it only gives me the element associated with the entire tab bar. (ie, the red box shows across the entire tab section and doesn't give me the individual tab with the correct name I am looking for)

Or is there a way to create a snapshot of the individual tab and add it to the repository so I can reference it in a WaitFor action?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3908
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Workaround for when network is slow

Post by odklizec » Mon Apr 30, 2018 7:23 am

Hi,

I'm afraid, that without seeing your app under test or at very least a Ranorex snapshot of the tab in question, there is nothing anyone here can do or suggest. If the problematic tab cannot be identified, then you must most probably use another element for waitfor action? Eventually, it may be possible to use RAW test (via GDI capture list).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ModelingPaul
Posts: 13
Joined: Thu Apr 05, 2018 10:46 pm

Re: Workaround for when network is slow

Post by ModelingPaul » Tue May 01, 2018 3:53 pm

I figured it out...

I just used the tab bar element as the Repository item for the WaitFor action instead of trying to wait for a specific tab to appear. Once the focus goes back to the tab bar after the WaitFor action is completed then I am good to go for the next step. I didn't try and grab the individual tab as I didn't really need it.