Search code examples
selenium-webdriverautomationbrowser-automationpageobjectskatalon-studio

How to Automate 2 (or more) similar web applications (Same business logic), with only difference of Element locations?


I have two similar web applications to automate.

  • Both have the same business logic and
  • similar navigation (different domains)
  • BUT Different Locators of same elements.

How should I deal with this? How should I set up and manage everything efficiently?

I am using Katalon Studio.

Did anyone encounter such scenarios?


Solution

  • You can use the Page Object Model.

    With the Page Object Design Pattern you can achieve

    a clean separation between test code and page specific code such as locators (or their use if you’re using a UI Map) and layout.

    Basically, one Page Object will hold locators for one app and the other one will hold the locators for the other app. Everything else can be reused.

    There's also some discussion on it on Katalon forum.