We are developing Page Object Model Framework for our web application test. The problem is we are having three different structure for the same page type. We want our automation to work in all cases. What is the best way to handle these scenario?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
My first advice is to not write automated tests for pages that change frequently. You may be better off testing those pages manually.
If you insist on automation, think about which aspects of the pages do not change, and write classes to model those aspects. For example, if forms always consist of text fields and a submit button, you can write a class to model that. Or if your submit buttons always have the same CSS class, or always have the same ID, you can write a class to model that.