Page 1 of 1

Play recording works fine, compiled version does not

Posted: Tue Feb 09, 2010 10:45 pm
by weinnir
I'm struggling to understand what's going wrong as it seems nothing on my part is wrong.
The scenario is as follows:
I've created a recording, at first without any user code in it. When playing the recording (clicking the green Play button in the rxrec file), the commands are being processed as expected. However, when I try to run the project which calls only that recording which was working properly when played, the projects compiles just fine but fails every time on the first step, with an ElementNotFoundException referring to the first step's element.
How can that be? Everything in the generated code (which I have not touched) seems perfectly normal.
I've increased the Maximum length of text values in RanoreXPaths to 1000 (to make sure lengthy repository names are not causing any problem) and increased the generation tree search depth to 4 (depth of element in the repository is up to 3).

What's going on here?
Using version 2.2.1.7599 on a .NET winform application

Re: Play recording works fine, compiled version does not

Posted: Wed Feb 10, 2010 3:13 pm
by Support Team
Hi weinnir!
Try to increase the Element Search Timeout for the elements.
Search depth and length of text values settings should`ve no influence on that issue. Please reset the Search depth to its default value ("1"), it affects the way RanoreXPaths and repositories are built (a value different from "1" should only be used if "Enable folder autogeneration" in the repository settings is disabled)!
Also an update to Ranorex 2.2.2 would be recommended.

Best regards,
Christian
Ranorex Team

Re: Play recording works fine, compiled version does not

Posted: Wed Feb 10, 2010 5:05 pm
by weinnir
Thanks,
Increasing the timeout for that element did resolve the issue. The question to ask is why does it take longer to search for element when running as a compiled exe as opposed to the test "playing".
Nonetheless, this resolve my issue. Thanks again for the quick response!

Re: Play recording works fine, compiled version does not

Posted: Wed Feb 10, 2010 9:42 pm
by Support Team
weinnir wrote:The question to ask is why does it take longer to search for element when running as a compiled exe as opposed to the test "playing".
It just takes longer for the first element to be found, since all the components involved to find the element need to be loaded and initialized on the first access. I added a bug entry for this in our database, maybe we can find a way to minimize the initial load time or minimize its influence on the element timeout.

Regards,
Alex
Ranorex Support Team