Hi all,
We are using Ranorex to automate various activities across all product suites in the company.
While working on some web component, i've encountered an issue with identifying an element on the page.
The XPath to the element is something similar to:
body/div/div[@id='SuiteNavigation']/div/div[@id='systemApplications']/table/tbody/tr/td[14]
On another scenario the same element has this path:
body/div[@id='SuiteNavigation']/div/div[@id='systemApplications']/table/tbody/tr/td[14]
In order to keep my code consistent, i've looked for a proper generic way to have both options valid under a single repository item, which led me to have this:
body//div[@id='SuiteNavigation']/div/div[@id='systemApplications']/table/tbody/tr/td[14]
The original item identification takes ~ 1 second
With // (match any descendant) it takes ~ 25 seconds.
Is there a way to improve on this, as this is unacceptable performance from our side?
Thanks
Lior
Searching for a web element takes ~ 25 seconds
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Searching for a web element takes ~ 25 seconds
Hi,
I'm sorry but here is no other solution for a RanoreXPath fitting both paths.
By using // (match any descendant) all descendants of the outgoing node will be gone through, which, of course, takes some time.
Another possibility is to use the exact path, which will make the automation faster.
Or maybe following forum posts will help you:
http://www.ranorex.com/forum/performanc ... t1155.html
http://www.ranorex.com/forum/cachesession-t1685.html
Regards,
Tobias
Support Team
I'm sorry but here is no other solution for a RanoreXPath fitting both paths.
By using // (match any descendant) all descendants of the outgoing node will be gone through, which, of course, takes some time.
Another possibility is to use the exact path, which will make the automation faster.
Or maybe following forum posts will help you:
http://www.ranorex.com/forum/performanc ... t1155.html
http://www.ranorex.com/forum/cachesession-t1685.html
Regards,
Tobias
Support Team
Re: Searching for a web element takes ~ 25 seconds
Hi, thanks for replying!
Is there an option to define a search, where a "find all descendants" is performed, however, upon FIRST MATCH, the result will be returned?
Can this be raised as some suggestion for future versions? if so, how ?
Is there an option to define a search, where a "find all descendants" is performed, however, upon FIRST MATCH, the result will be returned?
Can this be raised as some suggestion for future versions? if so, how ?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Searching for a web element takes ~ 25 seconds
This is already the default behavior for all "FindSingle" methods, i.e. for all repository operations. Only the "Find" methods return a list of all elements complying to the specified RanoreXPath.liortal wrote:Is there an option to define a search, where a "find all descendants" is performed, however, upon FIRST MATCH, the result will be returned?
I guess the problem is not that so many items are found, but that too many elements are searched.
Regards,
Alex
Ranorex Team