Page Object Model


Is there any way to implement page object model in katalon studio? Please help


anyone there pls help me on this


POM is an idea separating each WebPage into smaller PageObject for maintainence purpose. In stead of making each WebPage a separated Class (ie implemeted in Java, etc), in Katalon Studio, we use the same approach with a little bit different implementation: Object Repository and Test Case.

Hence, there are 2 options we could use to implement POM:
- Use script mode completely. In this mode (at Keywords section), we can create PageObject classes (groovy/java) the same as implementation of any testing frameworks
- Use Katalon manual mode to create a structure as following image. PageObject is splitted at 2 area: Object Repository and Test Cases. The “call TestCase” function is used to reuse/call methods built in each page.



We implement “page object Model” or Page object Pattern by identifying first the pages… calling them: Page_Login,Page_Home,Page_ContactUs, etc . Within those pages are the objects defined in the object repository(this is ok to have the object once and not duplication of the object).
In the Keywords section we have Page_Login class with all the necessary methods to log to the application…implemented as @keyword (example : login keyword , so in all tests that needs to login…we call only one keyword by passing por example user and password). So we have each page has it own class keywords like selenium does.


Here is an example on how i implemented:


I tried to implement the POM model in Katalon, and used it with BDD tests.
I’ve got an issue in the “loginSteps.groovy” file, with the customkeyword “login(String Username, String Password)”. Indeed, the test failed to enter in this step.
I tried to bypasse customkeyword and write directly every login step in the “loginSteps.groovy”, and it worked.
So I guessed I’ve got an issue with my login customkeyword.

Any recommandation or advice ?


which error were you getting ?