I am trying to log in to a webpage.
I have encouter 3 possibiliteies
- popup box - user already logged in message
- popup box - welcome
- no login spawned, no popup box - system error or button not found
I have some conditions
If popup box exists Then continue
- If popup box text = "user already logged" Then Log message "user is already logged" and continue to your profile page
- If popup box text = "welcome" Then Log message "welcome to your dashboard" and continue to dashboard
2nd condition will fail with an ugly error if the popup is of type welcome (2)
I could change all conditions to If Object to address this, but, all If...Then statements could test if the condition exists and fail gracefully ("no text and box found") this would make KW tests less redundant and more readable
- this would NOT replace the standalone If Object which would still be a valid test is a lot of cases
PS: my actual popup can contain 20+ responses