Putting it all together
By now, you should be able to tell which one of the models is best for you. However, keep in mind that all of them (besides the PFM, which we consider an antipattern) are combinable.
Here is how it would look if all the models were working together:
Figure 5.10: Example of models working together
With this, we could have multiple IDs for an object, including screenshots with different resolutions, and the pages would be handled by different agents, which could be called in different servers by the model. This would create powerful, maintainable, and scalable automation.
Whilst having all these models together might not be the right solution for all applications, we have displayed here that we have the flexibility of combining them to best fit our needs. In the next section, we will cover how to automate code repetition in these models so that we can have maintainable, well-designed code that is not tedious to write.