One or Many Page Objects Per Task


Hi! I asked about instantiation of multiple page objects last year but I wanted to delve into this question a bit more. We are structuring our test cases per task. So in other words, it would be test case 1-- customer incident. We have a page object for the main page on customer incident. However, we have many sub forms on this page as well. For example the user name/address/phone number sub form that needs to be filled out and then another sub form with other info and then lastly a third subform. So with prior experience, we have noticed that instantiating more than 2 page objects causes a distinct and marked slow down of execution. At 3 instantiations, the scripts slow to a crawl.

So logically, I am left with creating a task based page object with everything in it including the main page as well as every single sub form object that will be needed to complete the task that is addressed in the test case.

Any thoughts or assistance you can provide would be appreciated. Thank you.