vendredi 29 décembre 2017

Design for supporting two version of web pages in java page object model

I am working on page object model. Here is the simplified pseudo code for a test

  • Go to home page
  • Navigate to my account page
  • Login
  • Do something
  • Logout
  • Verify something

Right now I have two versions of account page. And I have two classes for it. One for original account page and another new account page. Above mentioned test was written for original account page. What do I do so that I only create new home page (both pages with almost same methods, but with different locators) but can use the existing tests? There will be two version of other pages gradually.

Aucun commentaire:

Enregistrer un commentaire