Hello everyone,
I would like to provide test if there is any 502/504 error on page (that’s needed for now) and if not - continue to login. I used to make it several forms - if(condition) than if(!same condition), without second if, but using else, and if else. But nothing works and KatalonStudio cannot continue, because “Unable to verify text ‘502 Bad Gateway’ is present using regular expression”. Please help if there is any possible way to solve it.
This is my code sample (one of many attempts):
public void internalLogin(){
WebUI.navigateToUrl(’***’)
if(WebUI.verifyTextPresent(‘502 Bad Gateway’, true)){
KeywordUtil.markFailedAndStop(‘MANUALLY STOP: 502 Bad Gateway, page doesnt recognise’);
}else{
WebUI.setText(findTestObject(‘username’), ‘username’, FailureHandling.OPTIONAL)
WebUI.setEncryptedText(findTestObject(‘pswd’), ‘password’)
WebUI.click(findTestObject(‘Page_Login/button_Login’))
}
}
}
Regard