cancel
Showing results for 
Search instead for 
Did you mean: 

Application Modeller Path attribute dilemna

MarcETIENNE
Level 3
Hello all,

I am facing serious performance issues on serveral complex web applications, when using Path attribute to find objects.
Problem occurs on any version from BP 5.0 to latest 6.6.

Problem is :
- When I activate Path, object highlight is fast (under a second)
- When Path is desactivated, object highlight still works, but is extremely slow (up to 50 seconds!), although I checked all needed attributes to locate object (ID, Match index, Tag Name...)

As you know, path is not a reliable attribute as I may often change, so using path is not generally recommended.

So my question is : If you are facing the same issue, how did you do to deal with it ?

Best Regards,

------------------------------
Marc ETIENNE
Tech consultant
Aubay
Europe/Paris
------------------------------
4 REPLIES 4

david.flores
Staff
Staff
Hello Marc,

If you have not done so, try creating Dynamic Paths for those elements, this has worked well for clients.

Also, Here are some examples of attribute combination that have been proven to help when if using the Path or Dynamic Path attribute are not an option:
--Matching on match index + ancestor count
--Matching on match index + match reverse + ancestor count.
Match index: Matching on match index = 1 will force Blue Prism to finish it's search after it finds the first matching element.
(Otherwise it will continue searching through all elements even after finding a matching element - there maybe multiple matches).
Match reverse: Matching on the match reverse element will make Blue Prism search through all the elements in the reverse order. This can in some cases find the element faster.
Ancestor count: Matching on ancestor count will prevent Blue Prism searching deeper in the element tree than the number of levels specified.

Lastly, spying the element using AA/UIA mode has also been know to help and using Surface Automation(SA) (where needed) has also been a good alternative for customers.

Hope this helps.

------------------------------
Regards,

David Flores
Sr. Product Consultant
blue prism
------------------------------
Regards, [FirstName] [LastName] [JobTitle] [CompanyName]

DaveMorris
Level 14
In addition to the good advice David Flores gave, there are a couple of other things I often do when I encounter a web app where it takes forever for Blue Prism to find elements when not using the Path.

If Match Index along with ID etc doesn't work, I'll often try including Match Reverse. I didn't know about using Ancestor count, so that's a good one to try. After that, I will often go the route of determining the Path of the attributes at run time and then using the Path for the rest of the session that day or at least the rest of the time I have that web page open. Let's say I need to read the values from a list of things and I have to read them all separately (in the case that it can't be read as a table altogether). I'll have a dedicated element in app modeller that does not use the Path and it points to the first item in the list. I'll then use a Read stage to Get the Path of that element, and then I use string manipulation to increment the counter variable inside of it that I can use in a Dynamic Path attribute to find all the rest of the values in the same list. So, for reading the first element in the list, it may be really slow, but after that reading all the rest of the data it's pretty fast because it's now using the Path.

Example:
Let's say that the Path that I get from the first element in the list is this: /HTML/BODY/DIV(1)/TR(1)

That probably doesn't look like a legitimate xpath, but let's pretend like it is. I'll have the read stage get that Path from the element. Remember that I didn't use the Path to identify the element the first time so typically I have 2 different elements: 1 without the Path and 1 with a Dynamic Path.

Then I'll do string manipulation to change the Path to be a sort of template I can use so it becomes like this: /HTML/BODY/DIV(1)/TR({RowNumber}).

Then I just loop or whatever, replacing {RowNumber} with a different number each time such as 1, 2, 3, etc. and might look like this: /HTML/BODY/DIV(1)/TR(3)

That Path is used as an input to the Dynamic Path attribute. So, as I see it, it's not bad practice to use the Path, but it often can be important to retrieve the Path at runtime in case the structure of the page as changed.

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA

MarcETIENNE
Level 3

Thank you both David Flores and Dave Morris for your detailed answers.

David, I tried using 'Match Index" with reverse or not, and ancestor count, but unfortunately, in my case, it didn't make highligtht significantly faster.
Also, AA works but is definitevely slow, so not an option.
But UIA seems to work quite fine, not as fast as HTML (with PATH activated), but decent speed. Bad luck for me, I can't use UIA on customer site for now, because they still use 6.2 version.

Dave, your proposal is very interesting. It's not simple to implement, and also can be tricky to maintain, but at least process is fast.

I was thinking of two other method to solve path problem.

First one is using dynamic path attribute. So object is located with path, and if highlight fails, then trying to locate object with blank path (it's like not using path at all). So if path change, process still works, but slower. I guess that new path could be stored automatically for next time process is running.

Second one is by using JavaScript injection to locate object by ID, and then retrieving path still with JS. I don't know if it's really possible, still WIP for me 🙂

One again thanks guys for theses inputs.

Best regards,
Marc



------------------------------
Marc ETIENNE
Tech consultant
Aubay
Europe/Paris
------------------------------

TheoLau
Level 2
Hi,

I ran into a simular problem where the path would change every other webcall. So I decided to get the path by the ID and save the path into a queue, tagged with the id. So if I call any given ID the queue will be checked for a path. Afterwards the path will be checked for leading to the given ID and its done.​

It takes a while for the first try, but will update itself.

Best regards,
Purswader

------------------------------
Theo Lau
Commerzbank AG
Commerzbank AG
------------------------------