Store xpath matches in array, prefix values & loop through

Given the following HTML:

		<a href="test1.html">test1</a>
		<a href="test2.html">test2</a>

I want to store all attribute values for xpath=(/html/body/a)@href (so “test1.html” and “test2.html”) in an array, prefix them with and later on loop through that array. How can I do that? Thanks!

Store it in csv, after with csvreadarray you can convert csv line in array

Thank you, but shouldn’t I be able to do that all in memory? Something like this pseudocode:

myLinks = (/html/body/a)@href 

foreach link in myLinks:
  link = "" + link
foreach link myLinks:
  // work here with absolute URL

I never used array I do not know well array function sorry I usually automate everything without using array.

Search in the forum array and read if there are examples.

@newuserkantu’s solution should work well. If you want to avoid this “detour” of saving the CSV file, you can write Javascript code for this conversion and run it with executeScript_Sandbox.