How i can use tag of page with name of archive

I have this line in my code:

for(def rowNum=1; rowNum <=findTestData(“data/data”).getRowNumbers() ; rowNum++)

And for now, i use this for name my file, and the code is this:

def file1 = new File((‘G:/Infox/page’ + rowNum) + ‘.htm’)

And with this i get file names like page1.html, page2.html and more…

But in this page, have a tag in the page with name of my cliente. My question is how i can get this TAG name in the html page, and use this to save the page. Where now is page1.htm will transform to JHON_WILSON.html for example.

I will change the variable “rowNum” for another to get the name in the page.

Someone can help me?

def name = WebUI.getText(findTestObject("path/to/yourTAG_TestObject"))
def file1 = new File((‘G:/Infox/page’ + name) + ‘.htm’)

If you mean the VALUE of the tag…

def name = WebUI.getValue(findTestObject("path/to/yourTAG_TestObject"))
def file1 = new File((‘G:/Infox/page’ + name) + ‘.htm’)