cancel
Showing results for 
Search instead for 
Did you mean: 

Using Wildcards for HTML Element

jonathan_mak
Level 3
Hi, I am attempting to use Wildcards on some of my HTML elements because the web application uses tabs and values can change dynamically. For example.. ID: ext-comp-### Path: /HTML/BODY(1)/DIV(##)/UL(1)/LI(1)/A(1) Even thought I am able to highlight these elements using wildcards, the search is incredibly slow and does not work when I try actually to run a Click action on it. Do you have any possible workarounds for this? I've tried many different Match combinations and find it impossible to highlight/search the element I want effectively. Thanks in advance
2 REPLIES 2

AgneseGurecka
Level 2
Wildcards don't really work on HTML. Workaround for this might be making the element have dynamic path and then, wherever you would want to use this element in process, you would have a numeric counter and a wait stage, basically, if element is not found, you add +1 to your number and try to find the element again, repeat till you find it. The dynamic path, in whatever stage you use the element in, would look something like - ""/HTML/BODY(1)/DIV("" & [Counter] & "")/UL(1)/LI(1)/A(1)

jonathan_mak
Level 3
Thanks a lot agnese, I managed to effectively retrieve specific highlighted elements by enabling Match Index and Match Reverse. I'm not sure how robust this is but if it fails in the future I will try your method which sounds like a good idea. Thanks again.