Regex in Slelectors

@mkankatala

I have selectors which are dynamic in nature . The difference is one diesnot have idx and other two idx value changes. How can I use regex to make selectors dynamic in nature. for example if the tag contains ‘ONE-RECORD-HOME-FLEXIPAGE2’ search for that particular ui element

’ tag=‘ONE-RECORD-HOME-FLEXIPAGE2’ />

tag=‘ONE-RECORD-HOME-FLEXIPAGE2’ idx=‘2’

tag=‘ONE-RECORD-HOME-FLEXIPAGE2’ idx=‘3’

we would assume that we can also use

tag='ONE-RECORD-HOME-FLEXIPAGE2' idx='1'

just test it within the UiExplorer

@ppr

Tested with idx=1 . It doesnot work

@ppr

can we use contains function in selectors ?

we would model it with wildcards or can think about regex

@ppr

can we do something like this not sure if this is correct

<webctrl tag=‘ONE-RECORD-HOME-FLEXIPAGE2’ | tag =‘ONE-RECORD-HOME-FLEXIPAGE2’ AND idx=‘1’ matching:tag=‘regex’ />

no, this is against the nature of selectors / regex selector

We still can produce working Selectors using idx=‘1’ also when not offered at the Attribute list

We recommend to approach and analyze it relaxed carefully within the UiExplorer
Are you sure that this webelement is of tag: ONE-RECORD-HOME-FLEXIPAGE2?

Hi @marina.dutta

Instead of using the idx attribute there is no other attribute which contains the sequence of numbers like idx. Might be, the row attribute has the values like this. Check and find the other attribute.

Hope it helps!!

@marina.dutta

to get progress we also recommend

  • clear and elaborate on the overall goal which is aimed
  • ensure that the option of integrations was checked as well
  • check the option of using find children and post process the retrieval result