If statement not working as expected:
I am testing a web page where “OPENED_ACCOUNT” OR “PROSPECT_CLIENT” text will display.
When “OPENED_ACCOUNT” displays my if condition works.
When “PROSPECT_CLIENT” displays my if condition DOES NOT WORK?
Has anyone see this before?
if((WebUI.verifyTextPresent(“OPENED_ACCOUNT”, false) || WebUI.verifyTextPresent(“PROSPECT_CLIENT”, false))){
println ("Text found… ")
//Delete the records found
while (WebUI.verifyTextPresent(“OPENED_ACCOUNT”, false) || WebUI.verifyTextPresent(“PROSPECT_CLIENT”, false))
{
WebUI.click(findTestObject(‘MyObject’))
WebUI.acceptAlert()
WebUI.delay(1)
WebUI.acceptAlert()
WebUI.delay(1)
}
}