Hi,
If enter invalid password upto 3 times, then every different sentence is showing that measne remaining attempt it showing like,
Incorrect Password 4 attempts remaining
Incorrect Password 3 attempts remaining
Incorrect Password 2 attempts remaining
Incorrect Password 1 attempts remaining
I expect that the script should be passed if I get any one sentence.
So how do you write a script for the expected condition?
Following is a script I have written,
WebUI.openBrowser('')
WebUI.maximizeWindow()
WebUI.navigateToUrl('website')
WebUI.click(findTestObject('Object Repository/TracetLogin/Page_Tracet Login - Tracet - Fixed Asset Ma_6ba7fe/span_Select Organization'))
WebUI.setText(findTestObject('Object Repository/TracetLogin/Page_Tracet Login - Tracet - Fixed Asset Ma_6ba7fe/input_Select Company_CompanyID'),
'Listany New')
WebUI.click(findTestObject('Object Repository/TracetLogin/Page_Tracet Login - Tracet - Fixed Asset Ma_6ba7fe/span_Listany New'))
WebUI.click(findTestObject('Object Repository/TracetLogin/Page_Tracet Login - Tracet - Fixed Asset Ma_6ba7fe/span_Enter User Name'))
WebUI.setText(findTestObject('Object Repository/TracetLogin/Page_Tracet Login - Tracet - Fixed Asset Ma_6ba7fe/input_User name_txtUserName'),
'Amita')
WebUI.click(findTestObject('Object Repository/TracetLogin/Page_Tracet Login - Tracet - Fixed Asset Ma_6ba7fe/span_Enter Password'))
WebUI.setEncryptedText(findTestObject('Object Repository/TracetLogin/Page_Tracet Login - Tracet - Fixed Asset Ma_6ba7fe/input_Password_txtPassword'),
'2MI5LF/YjhgjdsZ3lLyhf7rfGnb0lZQ9g==')
WebUI.click(findTestObject('Object Repository/TracetLogin/Page_Tracet Login - Tracet - Fixed Asset Ma_6ba7fe/span_Login'))
WebUI.closeBrowser()
Before closing I have entered conditions as,
if (UserName=="Amita" && password==β111111β)
{
WebUI.verifyElementText(findTestObject('TracetLogin/Basic Validation/Page_Tracet Login - Tracet - Fixed Asset Management System/span_Incorrect Password 4 attempts remaining'),'Incorrect Password 4 attempts remaining')
}
else if (UserName=="Amita" && password==β111111β)
{
WebUI.verifyElementText(findTestObject('TracetLogin/Basic Validation/Page_Tracet Login - Tracet - Fixed Asset Management System/span_Incorrect Password 3 attempts remaining'),' Incorrect Password 3 attempts remaining')
}
Can anyone please tell me how to write this condition-based script?