Help with Regex in Selector
Hi,
I am scripting a web application using keyword testing.
I want to add a checkpoint to a field that shows the record number. This number increments as new records are created. The problem is that TC fails to recognize the field on playback as the original value is incremented.
Here is the list of xpath selectors used:
//lightning-formatted-text[.=’237288′]
//flexipage-tab2[@id=’tab-26′]//records-record-layout-row[5]/slot/records-record-layout-item//slot/lightning-formatted-text
I would like to use a regular expression to replace the “237288” value. I tried to use:
//lightning-formatted-text[.=regexp(\d{6})]
//lightning-formatted-text[.=regex(\d{6})]
Thanks.
Read more here: Source link