Click links on webpage that match values in data table

Hi!!

I have done a data scrape of a web page with links, into a data table (dtLinks)
I now want UI path to click on each link and perform an action.
I am running these actions in a FOR EACH ROW loop to make sure all the links that were scraped, get clicked on and processed.

My problem is, the scrape takes the visible part of the link, but is ALSO taking the INVISIBLE part of the link (HTML/JAVA code) and so the LINK column in the data table looks like this:

REGNSK01K06/REGNSK48H15/ST01/2jsfwmp1448897_taskViewForm_circuitTable___row 0_portletUrlScript_1=function() { var url = ‘http://cvnet.stholdco.com:80/webreports/layoutReport.pdf?=&workRequestNumber=140459&wmp_tc=1448897&systemId=0000871535&wmp_rt=render&showEquipmentName=true&hierarchicalView=false&report=FULL&detailView=3’; return url; }; jsfwmp1448897_taskViewForm_circuitTable___row0_cScriptForLink_1=function() { var url = jsfwmp1448897_taskViewForm_circuitTable___row0_portletUrlScript_1(); window.open(url,“popup”,“status=no,toolbar=no,scrollbars=yes,resizable=yes”); };

Meanwhile the ACTUAL Link shows on screen as:
REGNSK01K06/REGNSK48H15/ST01/2

so basically, I need to delete everything in the data table column starting at ‘jsfwmp…’

OR… is there a better way to match the value in the data table to a link on the page?

Thanks in advance!
Rob.

Hi,

Does the string which you want to delete always start with “jsfwmp”?
If so, the following regex will work.

System.Text.RegularExpressions.Regex.Match(yourString,“.*?(?=jsfwmp)”).Value

Regards,

Thank you Yoichi!! I certainly appreciate your input.
For now, instead of clicking on the link to view the technology, I’m using a ​".contains"
​and comparing all the circuit prefixes in the list instead (which in our case, also identify the type of technology the circuit rides on) and that seems to be working fine for me. Thanks!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.