My if statement seems to be stoping on the if block and not continuing onto the else block, ive ran the script when its true and it runs fine but when the element is visible i want the else block to run. Ive looked on a few other topics but nothing seems to work for me. I assume its just a failure handling issue and im doing it wrong.
if (WebUI.verifyElementNotVisible(findTestObject(‘V9.1 Testing/Page_CIPHR Self Service 9.1.0/span_HR Admin’)))
{
WebUI.click(findTestObject(‘V9.1 Testing/Page_CIPHR Self Service 9.1.0/span_Log Out_glyphicons glyphi’))
WebUI.click(findTestObject(‘V9.1 Testing/Page_CIPHR Self Service 9.1.0/span_HR Admin’))
}
else
{
WebUI.click(findTestObject(‘V9.1 Testing/Page_CIPHR Self Service 9.1.0/span_HR Admin’))
}.
Just going to add this, after using continue on failure the test would be marked as a fail even though it passes becuase the if statement is a variable that will change - this worked for me