Used Verify Element Present is throwing an exception instead of false. Using FailureHandling condition also. Still throwing exception
Show us the code.
@Russ_Thomas, thanks for the reply.
Popup may come or may not. If it displays will click. Please find the exception also
@Keyword
public void verifyUpdateButtonAndClickOnCancel(String name){
WebUI.click(findTestObject('Dashboard/View and Update button',[('workspaceName'):workspaceName, ('typeOfAction'):('VIEW')]))
KeywordUtil.logInfo("Clicked on VIEW button")
boolean popupDisplayed = WebUI.verifyElementPresent(findTestObject('Locators/Div Contains Class',[('text'):'popupModalCard']), GlobalVariable.short_timeout, FailureHandling.CONTINUE_ON_FAILURE)
if(popupDisplayed){
WebUI.click(findTestObject('Locators/Span Contains Text',[('text'):'CANCEL']))
KeywordUtil.logInfo("Clicked on CANCEL button")
}
else{
KeywordUtil.logInfo("Update Popup not displayed")
}
}