WebUI Test Object - Best Practice

I guess that you have tons of duplicating Test Object with different id but with the same locator (XPath expression or CSS Selector). I would guess that you can shrink the existing 15K+ objects to smaller size (e.g, 1K) if you could eliminate all the duplications. The DRY is the primary principle you should follow in managing Test Objects in Katalon Studio.

I am afraid that the Web Recorder tool of Katalon Studio does NOT have the DRY principle in design. Rather it lets you innocently violate the DRY principle. It makes you, non programmers, be careless enough to creates tons of duplicating Test Objects. Personally I do not use the Web Recorder tool at all because of this unthoughtful design. The Web Recorder is nice to get you started with WebUI test automation. But you should not rely on it long. As soon as you start building test suites of good size, you should stop using the tool.

I agree with @grylion54’s opinion.

I too give a folder tree of Test Objects that corresponds to the structure of URL of the web pages. This is critically important to eliminate disorder and duplications. Please find an example of my project:

Please find subfolders auth, LogInPage plus a Test Object “input_Log in” corresponds to an <input type="text"> field with label “Log in” in a web page at the URL http://<hostname>:<port>/auth/login :

I suppose you would want to learn and apply the “Parameterize Web Test Objects” to reduce the number of Test Objects as well.

Katalon Studio offers no help to find duplicating Test Objects. You need to find them by your deep thinking or developing tools for yourself.

Once you identify which Test Object should be renamed or removed, then Katalon Studio offers a bit of help — it will automatically rewrite the references within the Test Case scprtis to the Test Object.

Hard job, I suppose, but you can do it if you really want to.


The following post tells my view about Project Object Model in Katalon Studio:

@sumiranraut96

POM is a pattern of Object Oriented Progragamming. It requires seasoned programming skill in Java/Groovy. I guess that POM is not the way you can take.

3 Likes