RepoItemInfo.CreateAdapter adds extra 5 seconds to specified timeout

Bug reports.
amross
Posts: 7
Joined: Thu Oct 13, 2016 12:03 am

RepoItemInfo.CreateAdapter adds extra 5 seconds to specified timeout

Post by amross » Fri Aug 17, 2018 2:23 am

Ranorex version = 8.2
OS = Windows 7 Service Pack 1 64bit
Chrome web application.

I have noticed that ReportItemInfo.CreateAdapter(throwException, waitTimeout) isn't working as described. After trying different values, it seems to add an extra 5 seconds to the given timeout. If an element does not exist, the method returns after the given timeout + 5 seconds.
Report.Info("Checking RepoItemInfo.Timeout");
Report.Info("Calling RepoItemInfo.CreateAdapter with timeout "+timeout.TotalMilliseconds);
T adapter = info.CreateAdapter<T>(false, timeout);
Report.Info("Finished create adapter call. ");
The output in the Ranorex report, with timestamps, is this:

10:40:51 Info User Checking RepoItemInfo.Timeout
10:40:51 Info User Calling RepoItemInfo.CreateAdapter with timeout 500
10:40:57 Info User Finished create adapter call.

After trying different values, it seems to add an extra 5 seconds to the given timeout.
e.g. if I pass in 30 seconds timeout, the call returns after 35 seconds.
if I pass in 500 milliseconds, the call returns after 5.5 seconds.

Is this a known limitation of CreateAdapter?

User avatar
RobinHood42
Posts: 324
Joined: Fri Jan 09, 2015 3:24 pm

Re: RepoItemInfo.CreateAdapter adds extra 5 seconds to specified timeout

Post by RobinHood42 » Mon Aug 20, 2018 10:13 am

Hi amross,

I tried the following code and Ranorex definitely doesn't add a 5 seconds extra delay. -> Tested with Ranorex 8.2.1
  var watch = Stopwatch.StartNew();
            watch.Start();
            var bla = repo.MyApp.SelfInfo.CreateAdapter<Unknown>(false, 10000);
            watch.Stop();
            Console.WriteLine("Needed time: " + watch.ElapsedMilliseconds);
Cheers,
Robin :mrgreen: