(sorry, big newbie here, but I'll do my best to make my question and explanation clear)
Hi everyone, I need help with a test case:
I'm checking a website and I have a payment page: When payment is validated, it can succeed, or it can fail. -> If it succeeds, next page is displayed. -> If it fails, we stay on the same page and a warning message is added. The third failure will go to next page in any case (if failure, payment will be handled differently, so we move on anyway).
=== What I do now===
For now I have setup the payment form so that I get at least one failure (normally I should get two). So my test case looks like this :
- click on payment button
- [front end: pop-in "processing payment]
- [back end: Payment fails]
- Wait for element "Warning message" to be displayed
- click on payment button
- [front end: pop-in "processing payment]
- [back end: Payment fails]
- Wait for element "Warning message" to be displayed
- click&wait on payment button
- [front end: pop-in "processing payment]
- [back end: Payment fails but we don't care]
- [front end:next page is displayed]
If tested manually, I get two failures message. But with Selenium IDE it seems I get only one failure message, I suspect it's because Selenium is acting "behind" the popin. My test case is passed anyway, but I'd like to make it cleaner, and re-usable.
Problem with my test case: after a first failure, warning message is not removed while 2nd payment attempt is made, so my check of warning message will immediately pass, regardless of success or failure of this 2nd payment attempt.
=== What I need ===
(note that I'm actually not a developer per se, so be nice ;) )
I need Selenium IDE to validate my test case as long as we go to next page, regardless the number of failure. I would need something like :
- Try payment
- If succeed and next page is displayed: PASS
- If failed : try again
- Try payment
- If succeed and next page is displayed: PASS
- If failed : try again
- Try payment
- next page should be displayed in any case, if so: PASS
Is there a way to do this using Selenium IDE commands? Any suggestions or tricks you'd recommend?
Thanks a lot.