Get Text from Page and Store in Variable

Hi Josh,

Below is the script,Hope this works for you.
Fetch Feature element from page and navigate to Feature page
https://katalon.com/Feature

WebUI.openBrowser(’’)

WebUI.navigateToUrl(‘https://katalon.com/’)

WebUI.verifyElementPresent(findTestObject(‘Page_Katalon Studio - Simple Power/a_Features’), 7)

attribute = WebUI.getAttribute(findTestObject(‘Page_Katalon Studio - Simple Power/a_Features’), ‘text’)

println(attribute)

Strattribute=WebUI.concatenate([‘https://katalon.com/’, attribute] as String[],
FailureHandling.STOP_ON_FAILURE)

println(Strattribute)

WebUI.navigateToUrl(Strattribute)

1 Like