Searching for a web element takes ~ 25 seconds

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
liortal
Posts: 9
Joined: Sun Jun 19, 2011 8:55 pm

Searching for a web element takes ~ 25 seconds

Post by liortal » Sun Jun 19, 2011 9:02 pm

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

User avatar
Support Team
Site Admin
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

Post by Support Team » Tue Jun 21, 2011 3:05 pm

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

liortal
Posts: 9
Joined: Sun Jun 19, 2011 8:55 pm

Re: Searching for a web element takes ~ 25 seconds

Post by liortal » Wed Jun 22, 2011 4:15 pm

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 ?

User avatar
Support Team
Site Admin
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

Post by Support Team » Wed Jun 22, 2011 6:14 pm

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?
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.

I guess the problem is not that so many items are found, but that too many elements are searched.

Regards,
Alex
Ranorex Team