Cross-Platform Page Object Model design pattern: Tutorial for Robot Framework
6 min readNov 23, 2023
What Is the challenge?
- Elements of a mobile app (wether hybrid or native) have different locators on iOS and Android platforms.
- Creating two separate repositories for the same project is counterintuitive.
-> The solution is adopting a suitable design pattern.
For non medium members , here is a friend link to continue reading
What is a design pattern?
- A design pattern is a reusable and generalizable way of designing software that provides a structured template or blueprint for a software project.
- Design patterns encapsulate best practices, guidelines for code structure, the organization of code into folders and files, and other conventions.
Common design patterns are: page factory, page object model, Singleton pattern..
Why Page Object Model?
- Proven efficiency in enhancing code maintainability and reusability.
- POM addresses the challenges posed by differing locators and UX elements in iOS and Android
- Provides a structured approach to separate the test scripts from the underlying details of…