I wants to automate the scenario where user can sign up in the portal and then click on myprofile and do sign out where invalid signup will show error message and then click on okay. Now I am successfully able to execute the 2nd scenario where invalid user will through a error message but when i put valid login then my test case fail.
Here is my code:
WebUI.click(findTestObject(‘Page_Workilo Welcome/input_button (1)’))
if (WebUI.verifyElementPresent(findTestObject(‘Object Repository/Page_Workilo Welcome/Duplicate Email’), 10) == true)
{
WebUI.click(findTestObject(‘Object Repository/Page_Workilo Welcome/Duplicate Email’))
}
else
{
WebUI.click(findTestObject(‘Page_Workilo Welcome/li_My Profile’))
WebUI.click(findTestObject(‘Page_Workilo Welcome/a_Log Out’))
}
Now If I enter invalid email id then test case pass but when I enter valid email id it shows error that “Duplicate Email” object is not found . Please guide me on the above scenario.
Error result:
Test Cases/Sign-Up for Customer FAILED because (of) Unable to verify object ‘Object Repository/Page_Workilo Welcome/Duplicate Email’ is present (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Workilo Welcome/Duplicate Email’ located by ‘By.xpath: //button[@class=‘confirm’]’ not found)
Test Cases/Sign-Up for Customer.run:46
I have also attache my object file below: