How get value only if have text in page

Hi, i have a code like this:

for(def rowNum=2; rowNum <=findTestData("data").getRowNumbers() ; rowNum++)
{
WebUI.navigateToUrl('www')
WebUI.delay(3)
WebUI.setText(findTestObject('Object'), findTestData('data').getValue(1, rowNum))
WebUI.click(findTestObject('Object2'))
WebUI.delay(10)

String value = WebUI.getText(findTestObject('asd')).replaceAll("[^0-9]", "").trim();
Integer intValue = Integer.parseInt(value);
if (intValue >=  750)  {
	String value2 = WebUI.getText(findTestObject('asd2')).replaceAll("[^0-9]", "").trim();
	Integer intValue2 = Integer.parseInt(value2);
	
	if (intValue2 >=  750) {
	
	String Cred1 = WebUI.getText(findTestObject('S/cred1')).replaceAll("NAME","");
	String Cred2 = WebUI.getText(findTestObject('S/cred2')).replaceAll("NAME","");
	String Cred3 = WebUI.getText(findTestObject('S/cred3')).replaceAll("NAME","");
    **...**
}
}
else { ... }

The objetive is go to page and search value of ‘asd’ and compare if is < or > of 750
If is >, go to thenext step, if don’t, restart the loop.

The code works fine, but some times the page don’t load correct, and the code don’t can find the ‘asd’ value to compare, and broke the loop.

I need a solution to if the page don’t can find the ‘asd’ value, ignore and go to next loop, and don’t broken the loop with an error.

Hello,

you can test if element is present; if not, stop current iteration and continue.

if(!WebUI.verifyElementPresent(findTestObject("asd"), 1, FailureHandling.OPTIONAL)) {
	continue
}

Dont works.
When the script can’t find the object, the script stop with error.
I configure de project to continue on failure, but don’t work when the script don’t can find the object.

That’s weird, it works for me. I don’t get any failure/error, only warning.