Hi ZAPTEST TEAM,
I facing one problem. i wrote the scripts when successful message is not found then else case should be run but in that it did not go to else part. See Below Code:
‘Case 1: Invalid Username is provided (Both field are empty)
Application(“Log_on”).View(“View”).Object(“Log On”).Click
If Application(“Invalid_UserName”).View(“View”).Object(“Invalid username is provided.”).Exist then
Application(“Invalid_UserName”).View(“View”).CustomReport True,”Invalid username is provided.”,”Message is appeared Successfully”, True
Application(“Invalid_UserName”).View(“View”).Object(“OK”).Click
Application(“Log_on”).View(“View”).Object(“User Name”).Type Datatable.Value(“UserName”)
Application(“Log_on”).View(“View”).Object(“Log On”).Click
Else
Application(“Invalid_UserName”).CustomReport Error,”Invalid username is provided”,”Wrong Message”,True
Application(“Invalid_UserName”).View(“View”).Object(“OK”).Click
Application(“Log_on”).View(“View”).Object(“User Name”).Type Datatable.Value(“UserName”)
Application(“Log_on”).View(“View”).Object(“Log On”).Click
End If
Regards,
AQU