In web integration testing, page objects are expected to return other page objects as a result of some actions. For example, a LoginForm.submit() may return CustomerDashboard page object on success or a LoginFailed object on failure.
What I'm having difficulty understanding is what happens when the system is not quite that deterministic. For example Order.submit() may result in a OrderProcessing page, or an OrderProcessed page. What's the best way to handle such a scenario? Should Order.submit() return a tuple of possible PageObjects that then get handled in the individual test? What is the recommended approach here?
Aucun commentaire:
Enregistrer un commentaire