Help with an if statement for validating a variable value


I’m having trouble linking an if statement to a test case called within a test case. Per the below, I’m trying to run a verify element if the called test case contains an ‘abc’ value for the Organisation_Type:

WebUI.callTestCase(findTestCase(‘DemoTestCase’), [(‘Organisation_Type’) : Organisation],


if (Organisation == ‘abc’) {

WebUI.verifyElementPresent(findTestObject('DemoPage/DemoElement'), 0)

} else {

WebUI.verifyElementNotPresent(findTestObject(‘DemoPage/DemoElement’), 0)


The above also shows a mapping of variables (‘Organisation_Type’ with ‘Organisation’ where Organisation is pulling info from a data file).

Any help will be much appreciated, and apologies if this sounds confusing.


Using ‘visible’ instead of ‘present’ for the element detection fixed it.