Hello all
I have a performance issue with following:
WebElement el = ACADoc.FindSingle(...);
The page which contains this element is very large.
It is not the problem, that Ranorex cannot find the element - this works fine. But it takes a very long time (about 10 sec. in my case).
The element is in a top section of the page.
It seems like Ranorex scans the whole page till the end, even if the element is found already.
Is there a solution to make this faster?
Thanks & regards
Performance for FindSingle(..)
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Do you use Ranorex 1.5 or Ranorex 2.0? I can't tell from the code snippet you posted
Ranorex 2.0:
In earlier Ranorex Preview versions (up to Build 4977) the FindSingle method did search the whole subtree even if it already found a matching element.
This issue has been fixed for the current Ranorex 2.0 RC1 version, downloadable from our homepage.
Ranorex 1.5:
You are right, WebElement.FindSingle just calls WebElement.Find and returns the first element in the list of found elements. To minimize search time try using non-optimized paths, i.e. paths that don't inlcude placeholders like "//" or "*". Or try splitting up the search, i.e. don't always search from the root web element, but from some inner element that you found before.
Regards,
Alex
Ranorex Support Team
Ranorex 2.0:
In earlier Ranorex Preview versions (up to Build 4977) the FindSingle method did search the whole subtree even if it already found a matching element.
This issue has been fixed for the current Ranorex 2.0 RC1 version, downloadable from our homepage.
Ranorex 1.5:
You are right, WebElement.FindSingle just calls WebElement.Find and returns the first element in the list of found elements. To minimize search time try using non-optimized paths, i.e. paths that don't inlcude placeholders like "//" or "*". Or try splitting up the search, i.e. don't always search from the root web element, but from some inner element that you found before.
Regards,
Alex
Ranorex Support Team
Hi Alex
I work with 1.5.
I tried to use non-optimized paths and I have seen that this works much faster!
I miss-interpreted the label in the WebSpy [Optimize (slower)]. I thought this 'slower' is to the recording of the page elements.
Anyway, as soon as update prices (Ranorex 1.5 to 2.0) are available, I try to switch to the newest version.
But for the moment, I can work with the actual release in a absolute satisfactory manner!
Thanks & regards,
Daniel
I work with 1.5.
I tried to use non-optimized paths and I have seen that this works much faster!
I miss-interpreted the label in the WebSpy [Optimize (slower)]. I thought this 'slower' is to the recording of the page elements.
Anyway, as soon as update prices (Ranorex 1.5 to 2.0) are available, I try to switch to the newest version.
But for the moment, I can work with the actual release in a absolute satisfactory manner!
Thanks & regards,
Daniel
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
The "slower" in "Optimize (slower)" is true for building the path as well as for interpreting it. The advantage is though that the path is usually shorter and may be more robust regarding changes in the application.
Regards,
Alex
Ranorex Support Team
Glad to hear that!dareim wrote: But for the moment, I can work with the actual release in a absolute satisfactory manner!
Regards,
Alex
Ranorex Support Team