{"id":7730,"date":"2025-11-12T07:00:53","date_gmt":"2025-11-12T01:30:53","guid":{"rendered":"https:\/\/www.testleaf.com\/blog\/?p=7730"},"modified":"2025-11-11T16:20:28","modified_gmt":"2025-11-11T10:50:28","slug":"page-object-model-without-assertion-overload","status":"publish","type":"post","link":"https:\/\/www.testleaf.com\/blog\/page-object-model-without-assertion-overload\/","title":{"rendered":"Page Object Model Done Right: Removing Assertion Overload\u00a0"},"content":{"rendered":"<div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div><!--[if lt IE 9]><script>document.createElement('audio');<\/script><![endif]-->\n<audio class=\"wp-audio-shortcode\" id=\"audio-7730-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Page-Object-Model-Done-Right.mp3?_=1\" \/><a href=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Page-Object-Model-Done-Right.mp3\">https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Page-Object-Model-Done-Right.mp3<\/a><\/audio>\n<p><span data-contrast=\"auto\">When I first started my journey as a <a href=\"https:\/\/www.testleaf.com\/blog\/a-qa-engineers-guide-to-collaborating-better-with-developers\/\">QA engineer<\/a>, one of the things I quickly noticed was that our test scripts were <\/span><b><span data-contrast=\"auto\">messy, brittle, and hard to maintain<\/span><\/b><span data-contrast=\"auto\">. Each test case was filled with <\/span><b><span data-contrast=\"auto\">dozens of assertions<\/span><\/b><span data-contrast=\"auto\">, hard-coded locators, and repetitive code that made debugging a nightmare. I remember sitting through test runs that failed not because the application was broken, but because <\/span><b><span data-contrast=\"auto\">a single UI change broke ten different assertions<\/span><\/b><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">It was in that chaos that we realized we needed a <\/span><b><span data-contrast=\"auto\">better approach<\/span><\/b><span data-contrast=\"auto\">. That\u2019s when we decided to adopt the <\/span><a href=\"https:\/\/www.testleaf.com\/blog\/mastering-page-object-model-pom-in-selenium-a-practical-guide-with-real-examples\/\"><b><span data-contrast=\"auto\">Page Object Model (POM)<\/span><\/b><\/a><span data-contrast=\"auto\">\u2014but we didn\u2019t just implement it blindly. We learned that POM is <\/span><b><span data-contrast=\"auto\">powerful only when done right<\/span><\/b><span data-contrast=\"auto\">, especially in tackling the problem of assertion overload. In this blog, I\u2019ll share how we transformed our test framework, why removing assertion overload was critical, and the impact it had on our QA process.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h2><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"The_Problem_Assertion_Overload\"><\/span><b><span data-contrast=\"auto\">The Problem: Assertion Overload<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.testleaf.com\/blog\/page-object-model-without-assertion-overload\/#The_Problem_Assertion_Overload\" >The Problem: Assertion Overload\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.testleaf.com\/blog\/page-object-model-without-assertion-overload\/#The_Solution_POM_Done_Right\" >The Solution: POM Done Right\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.testleaf.com\/blog\/page-object-model-without-assertion-overload\/#The_Impact_of_Doing_POM_Right\" >The Impact of Doing POM Right\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.testleaf.com\/blog\/page-object-model-without-assertion-overload\/#Lessons_Learned\" >Lessons Learned\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.testleaf.com\/blog\/page-object-model-without-assertion-overload\/#FAQs\" >FAQs<\/a><\/li><\/ul><\/nav><\/div>\n\n<p><span data-contrast=\"auto\">In our legacy framework, every test method was littered with assertions:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-contrast=\"auto\">assertTrue(loginPage.isUsernameVisible());<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">assertTrue(loginPage.isPasswordVisible());<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">assertTrue(loginPage.isLoginButtonEnabled());<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">assertEquals(loginPage.getTitle(), &#8220;Login&#8221;);<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p><\/blockquote>\n<p><span data-contrast=\"auto\">At first glance, it seems thorough, right? But this approach had hidden consequences:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<ol>\n<li><b><span data-contrast=\"auto\">High Maintenance Cost<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Every small UI change required updating multiple assertions across hundreds of tests. Changing a button\u2019s ID or label meant dozens of failures, many of which were irrelevant to the actual business scenario.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Poor Debugging Experience<\/span><\/b><br \/>\n<span data-contrast=\"auto\">When a test failed, we couldn\u2019t immediately know <\/span><b><span data-contrast=\"auto\">which assertion was truly critical<\/span><\/b><span data-contrast=\"auto\">. Multiple failures in a single test caused confusion and wasted time, as developers and testers spent hours figuring out what really went wrong.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Reduced Test Reliability<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Tests failed intermittently because of minor UI fluctuations or timing issues. Assertions like <\/span><span data-contrast=\"auto\">isVisible()<\/span><span data-contrast=\"auto\"> or <\/span><span data-contrast=\"auto\">isEnabled()<\/span><span data-contrast=\"auto\"> often triggered false negatives when a page element was slightly delayed in loading.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Cluttered Test Code<\/span><\/b><br \/>\n<span data-contrast=\"auto\">The more assertions we added, the harder it became to read and understand the test flow. It was almost impossible for a new tester or developer to quickly grasp what the test was supposed to validate.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ol>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-7732\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Why-Too-Many-Assertions-Hurt-QA-Issues.png\" alt=\"Why Too Many Assertions Hurt QA - Issues\" width=\"1312\" height=\"736\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Why-Too-Many-Assertions-Hurt-QA-Issues.png 1312w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Why-Too-Many-Assertions-Hurt-QA-Issues-300x168.png 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Why-Too-Many-Assertions-Hurt-QA-Issues-1024x574.png 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Why-Too-Many-Assertions-Hurt-QA-Issues-768x431.png 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Why-Too-Many-Assertions-Hurt-QA-Issues-150x84.png 150w\" sizes=\"(max-width: 1312px) 100vw, 1312px\" \/><\/p>\n<p><span data-contrast=\"auto\">It became clear: <\/span><b><span data-contrast=\"auto\">assertion overload was slowing us down and increasing technical debt<\/span><\/b><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><strong>Check Out These Articles:<\/strong> <a href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers\/\">Epam interview questions<\/a><\/p>\n<h2><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"The_Solution_POM_Done_Right\"><\/span><b><span data-contrast=\"auto\">The Solution: <a href=\"https:\/\/www.testleaf.com\/blog\/page-factory-vs-page-object-model-pom-in-selenium-key-differences-best-practices\/\">POM<\/a> Done Right<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">Page Object Model is a design pattern that encourages <\/span><b><span data-contrast=\"auto\">separating the test logic from the page structure<\/span><\/b><span data-contrast=\"auto\">, but simply creating page objects wasn\u2019t enough. We had to <\/span><b><span data-contrast=\"auto\">rethink how assertions were used<\/span><\/b><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">1. Encapsulate Assertions Within Page Objects<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">Instead of scattering assertions across test methods, we moved them into the page classes. For example, rather than asserting visibility in the test:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<blockquote><p><span data-contrast=\"auto\">assertTrue(loginPage.isUsernameVisible());<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">We created a method inside <\/span><span data-contrast=\"auto\">LoginPage<\/span><span data-contrast=\"auto\">:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">public void verifyLoginFormVisible() {<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0\u00a0\u00a0 Assert.assertTrue(usernameField.isDisplayed(), &#8220;Username field is not visible&#8221;);<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0\u00a0\u00a0 Assert.assertTrue(passwordField.isDisplayed(), &#8220;Password field is not visible&#8221;);<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">\u00a0\u00a0\u00a0 Assert.assertTrue(loginButton.isEnabled(), &#8220;Login button is not enabled&#8221;);<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">}<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p><\/blockquote>\n<p><span data-contrast=\"auto\">Now, in the test method, we could simply call:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">loginPage.verifyLoginFormVisible();<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:0,&quot;335559740&quot;:240,&quot;469777462&quot;:[916,1832,2748,3664,4580,5496,6412,7328,8244,9160,10076,10992,11908,12824,13740,14656],&quot;469777927&quot;:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],&quot;469777928&quot;:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">This approach <\/span><b><span data-contrast=\"auto\">reduced assertion clutter in the test scripts<\/span><\/b><span data-contrast=\"auto\"> and made the tests more readable. The test method now describes <\/span><b><span data-contrast=\"auto\">what it\u2019s testing<\/span><\/b><span data-contrast=\"auto\">, not <\/span><b><span data-contrast=\"auto\">how it\u2019s testing it<\/span><\/b><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">2. Categorize <a href=\"https:\/\/www.testleaf.com\/blog\/free-playwright-tutorial-on-assertions-and-validations-for-automation-testers\/\">Assertions<\/a> by Page and Functional Area<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">We divided page objects into <\/span><b><span data-contrast=\"auto\">logical sections<\/span><\/b><span data-contrast=\"auto\">: form validation, button state, table verification, etc. Each section had its own verification methods. For example:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">LoginPage.verifyLoginFormVisible()<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">DashboardPage.verifySummaryCardsDisplayed()<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"2\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span data-contrast=\"auto\">AccountPage.verifyTransactionTableLoaded()<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">This organization allowed us to <\/span><b><span data-contrast=\"auto\">reuse assertion logic across multiple tests<\/span><\/b><span data-contrast=\"auto\"> and maintain consistency. If the login form changed, we only had to update <\/span><span data-contrast=\"auto\">verifyLoginFormVisible()<\/span><span data-contrast=\"auto\">, instead of touching every test that checked login elements.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<h4><b><span data-contrast=\"auto\">3. Remove Redundant Assertions<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">We audited our entire test suite and asked:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Does this assertion <\/span><b><span data-contrast=\"auto\">directly validate the functionality<\/span><\/b><span data-contrast=\"auto\"> we care about?<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"3\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Does this assertion <\/span><b><span data-contrast=\"auto\">overlap with another check<\/span><\/b><span data-contrast=\"auto\"> already present?<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">We removed redundant checks, keeping only those that validated <\/span><b><span data-contrast=\"auto\">critical user flows<\/span><\/b><span data-contrast=\"auto\">. This step alone reduced the number of assertions in our framework by nearly <\/span><b><span data-contrast=\"auto\">40%<\/span><\/b><span data-contrast=\"auto\">, significantly speeding up test execution and improving readability.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-7733\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Encapsulating-Assertions-in-Page-Objects-Steps.png\" alt=\"Encapsulating Assertions in Page Objects\" width=\"1312\" height=\"736\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Encapsulating-Assertions-in-Page-Objects-Steps.png 1312w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Encapsulating-Assertions-in-Page-Objects-Steps-300x168.png 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Encapsulating-Assertions-in-Page-Objects-Steps-1024x574.png 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Encapsulating-Assertions-in-Page-Objects-Steps-768x431.png 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Encapsulating-Assertions-in-Page-Objects-Steps-150x84.png 150w\" sizes=\"(max-width: 1312px) 100vw, 1312px\" \/><\/p>\n<h4><b><span data-contrast=\"auto\">4. Leverage Soft Assertions Where Needed<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">In scenarios where multiple checks were necessary, we used <\/span><b><span data-contrast=\"auto\">soft assertions<\/span><\/b><span data-contrast=\"auto\">. This allowed the test to continue executing even if some assertions failed, collecting all failures at the end. The benefits were clear:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"4\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Full view of all issues in a single test run<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"4\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Reduced false negatives due to minor UI timing issues<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<ul>\n<li aria-setsize=\"-1\" data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"4\" data-list-defn-props=\"{&quot;335552541&quot;:1,&quot;335559685&quot;:720,&quot;335559991&quot;:360,&quot;469769226&quot;:&quot;Symbol&quot;,&quot;469769242&quot;:[8226],&quot;469777803&quot;:&quot;left&quot;,&quot;469777804&quot;:&quot;\uf0b7&quot;,&quot;469777815&quot;:&quot;multilevel&quot;}\" data-aria-posinset=\"3\" data-aria-level=\"1\"><span data-contrast=\"auto\">Easier debugging and prioritization of actual business-impacting failures<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ul>\n<h4><b><span data-contrast=\"auto\">5. Integrate Verification into CI\/CD Pipeline<\/span><\/b><\/h4>\n<p><span data-contrast=\"auto\">Once we cleaned up our assertion logic and refactored tests using POM, we integrated them into our <\/span><a href=\"https:\/\/www.ibm.com\/think\/topics\/ci-cd-pipeline\"><b><span data-contrast=\"auto\">CI\/CD pipeline<\/span><\/b><\/a><span data-contrast=\"auto\">. With stable and meaningful assertions, the tests could run automatically in parallel across browsers without constant manual intervention. This made our <\/span><b><span data-contrast=\"auto\">daily sanity and regression testing more reliable<\/span><\/b><span data-contrast=\"auto\"> and freed testers to focus on new features and exploratory testing.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/selenium-webinar.testleaf.com\/?utm_source=Selenium_Webinar&amp;utm_medium=Organic&amp;utm_campaign=Selenium_Webinar\"><img decoding=\"async\" class=\"aligncenter wp-image-7676 size-full\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Selenium-Masterclass-1.png\" alt=\"Selenium Masterclass\" width=\"2048\" height=\"512\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Selenium-Masterclass-1.png 2048w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Selenium-Masterclass-1-300x75.png 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Selenium-Masterclass-1-1024x256.png 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Selenium-Masterclass-1-768x192.png 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Selenium-Masterclass-1-1536x384.png 1536w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Selenium-Masterclass-1-150x38.png 150w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/p>\n<p><strong>Further Reading:<\/strong> <a href=\"https:\/\/www.testleaf.com\/blog\/epam-interview-questions-with-answers-2\/\">Epam interview questions<\/a><\/p>\n<h2><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"The_Impact_of_Doing_POM_Right\"><\/span><b><span data-contrast=\"auto\">The Impact of Doing POM Right<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span data-contrast=\"auto\">Refactoring our framework and <\/span><b><span data-contrast=\"auto\">removing assertion overload<\/span><\/b><span data-contrast=\"auto\"> brought immediate benefits:<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<ol>\n<li><b><span data-contrast=\"auto\">Stable and Maintainable Tests<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Test scripts became easier to read, maintain, and extend. Page objects served as a single source of truth for UI structure and functional validation.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Faster <a href=\"https:\/\/www.testleaf.com\/blog\/har-files-for-qa-debugging-guide\/\">Debugging<\/a><\/span><\/b><br \/>\n<span data-contrast=\"auto\">When a test failed, the failure pointed directly to the <\/span><b><span data-contrast=\"auto\">core issue<\/span><\/b><span data-contrast=\"auto\">, not a cascade of redundant assertions. Developers appreciated this, and collaboration between QA and Dev became smoother.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Improved Execution Speed<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Reducing the number of assertions and cleaning up redundant checks decreased test run time, especially when running <\/span><b><span data-contrast=\"auto\">hundreds of tests in parallel<\/span><\/b><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Reusable Verification Methods<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Common verification methods were reused across multiple tests, reducing code duplication and enhancing consistency.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Better Test Reports<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Test reports became cleaner, highlighting <\/span><b><span data-contrast=\"auto\">real issues<\/span><\/b><span data-contrast=\"auto\"> instead of overwhelming everyone with assertion noise.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7734\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Benefits-of-Proper-POM-Implementation.png\" alt=\"Benefits of Proper POM Implementation\" width=\"1312\" height=\"736\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Benefits-of-Proper-POM-Implementation.png 1312w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Benefits-of-Proper-POM-Implementation-300x168.png 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Benefits-of-Proper-POM-Implementation-1024x574.png 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Benefits-of-Proper-POM-Implementation-768x431.png 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/11\/Benefits-of-Proper-POM-Implementation-150x84.png 150w\" sizes=\"(max-width: 1312px) 100vw, 1312px\" \/><\/p>\n<p><strong>Explore More:<\/strong> <a href=\"https:\/\/www.testleaf.com\/blog\/2025-top-automation-testing-infosys-interview-questions-with-expert-answers-from-testleaf-for-2-to-5-years-experience\/\">automation testing interview questions<\/a><\/p>\n<h2><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"Lessons_Learned\"><\/span><b><span data-contrast=\"auto\">Lessons Learned<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol>\n<li><b><span data-contrast=\"auto\">Assertion Overload is Hidden Technical Debt<\/span><\/b><br \/>\n<span data-contrast=\"auto\">It\u2019s easy to think more assertions mean better coverage, but too many assertions can <\/span><b><span data-contrast=\"auto\">obscure real failures<\/span><\/b><span data-contrast=\"auto\"> and increase maintenance costs.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">POM Is Not Just About <a href=\"https:\/\/www.testleaf.com\/blog\/ai-powered-element-locators-selenium-automation\/\">Locators<\/a><\/span><\/b><br \/>\n<span data-contrast=\"auto\">The true power of Page Object Model comes when <\/span><b><span data-contrast=\"auto\">assertions and verifications are encapsulated within page objects<\/span><\/b><span data-contrast=\"auto\">, making tests more expressive and maintainable.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">Quality over Quantity<\/span><\/b><br \/>\n<span data-contrast=\"auto\">Focus on meaningful, reusable, and critical assertions. This reduces test noise, improves debugging, and strengthens the overall framework.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/li>\n<\/ol>\n<p><a href=\"https:\/\/www.testleaf.com\/course\/selenium-automation-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5159 size-full\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Selenium.jpg\" alt=\"Selenium training in chennai\" width=\"2048\" height=\"512\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Selenium.jpg 2048w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Selenium-300x75.jpg 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Selenium-1024x256.jpg 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Selenium-768x192.jpg 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Selenium-1536x384.jpg 1536w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/06\/Selenium-150x38.jpg 150w\" sizes=\"(max-width: 2048px) 100vw, 2048px\" \/><\/a><\/p>\n<h3><\/h3>\n<h3><b><span data-contrast=\"auto\">Conclusion<\/span><\/b><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Moving from assertion-heavy scripts to a <\/span><b><span data-contrast=\"auto\">well-structured Page Object Model<\/span><\/b><span data-contrast=\"auto\"> transformed our QA process. By <\/span><b><span data-contrast=\"auto\">removing assertion overload<\/span><\/b><span data-contrast=\"auto\">, we made our tests more readable, maintainable, and resilient. Our automation framework became a <\/span><b><span data-contrast=\"auto\">reliable ally<\/span><\/b><span data-contrast=\"auto\">, not a fragile liability, allowing us to scale QA with confidence in a CI\/CD-driven DevOps environment.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">For any QA team struggling with brittle tests and assertion chaos, my advice is simple: <\/span><b><span data-contrast=\"auto\">refactor, encapsulate, and remove noise<\/span><\/b><span data-contrast=\"auto\">. Done right, Page Object Model doesn\u2019t just organize your code\u2014it elevates your entire <a href=\"https:\/\/www.testleaf.com\/blog\/junit4-vs-testng-why-switching-changed-our-automation-game\/\"><strong>automation game<\/strong><\/a>.<\/span><span data-ccp-props=\"{&quot;134233117&quot;:true,&quot;134233118&quot;:true,&quot;201341983&quot;:0,&quot;335559740&quot;:240}\">\u00a0<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2 data-start=\"1112\" data-end=\"1172\"><span class=\"ez-toc-section\" id=\"FAQs\"><\/span><strong data-start=\"1118\" data-end=\"1172\">FAQs<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p data-start=\"1174\" data-end=\"1481\"><strong data-start=\"1174\" data-end=\"1231\">1. What causes assertion overload in <a href=\"https:\/\/www.testleaf.com\/blog\/ai-in-test-automation-a-comprehensive-guide\/\">test automation<\/a>?<\/strong><br data-start=\"1231\" data-end=\"1234\" \/>Assertion overload happens when dozens of assertions are written in a single test, leading to cluttered scripts, false failures, and difficult debugging. It often appears in frameworks lacking structure or when assertions aren\u2019t grouped logically.<\/p>\n<p data-start=\"1483\" data-end=\"1752\"><strong data-start=\"1483\" data-end=\"1543\">2. How does Page Object Model reduce assertion overload?<\/strong><br data-start=\"1543\" data-end=\"1546\" \/>POM groups UI actions and verifications inside page classes. By moving assertions into reusable verification methods, duplicate and scattered assertions disappear, improving readability and maintainability.<\/p>\n<p data-start=\"1754\" data-end=\"2000\"><strong data-start=\"1754\" data-end=\"1805\">3. Should I use hard or soft assertions in POM?<\/strong><br data-start=\"1805\" data-end=\"1808\" \/>Use <strong data-start=\"1812\" data-end=\"1831\">hard assertions<\/strong> for critical failure points where the test cannot continue. Use <strong data-start=\"1896\" data-end=\"1915\">soft assertions<\/strong> when multiple UI checks are required and you want to capture all failures in one go.<\/p>\n<p data-start=\"2002\" data-end=\"2222\"><strong data-start=\"2002\" data-end=\"2050\">4. Does POM help new testers onboard faster?<\/strong><br data-start=\"2050\" data-end=\"2053\" \/>Yes. POM organizes locators, methods, and verifications cleanly, making it easy for new contributors to understand the flow without digging through complex test methods.<\/p>\n<p data-start=\"2224\" data-end=\"2407\"><strong data-start=\"2224\" data-end=\"2283\">5. Can POM work with Playwright, Selenium, and <a href=\"https:\/\/www.testleaf.com\/blog\/playwright-or-cypress-a-complete-guide-to-choosing-the-right-automation-tool\/\">Cypress<\/a>?<\/strong><br data-start=\"2283\" data-end=\"2286\" \/>Yes \u2014 POM is a <strong data-start=\"2301\" data-end=\"2319\">design pattern<\/strong>, not a tool feature. It works across frameworks like Selenium, Playwright, and Cypress.<\/p>\n<h5><strong>We Also Provide Training In:<\/strong><\/h5>\n<ul>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/selenium-automation-certification-training-course.html\"><strong>Advanced Selenium Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/playwright.html\"><strong>Playwright Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/genai-qa-engineers-training-course.html\"><strong>Gen AI Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/aws-cloud-architect-certification-training-course.html\"><strong>AWS Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/rest-api-testing-certification-training-course.html\"><strong>REST API Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/full-stack-developer-certification-training-course.html\"><strong>Full Stack Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/appium-mobile-automation-certification-training-course.html\"><strong>Appium Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/dev-ops-master-certification-training-course.html\"><strong>DevOps Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/apache-jmeter-testing-training-course.html\"><strong>JMeter Performance Training<\/strong><\/a><\/li>\n<\/ul>\n<h6><strong>Author\u2019s Bio<\/strong>:<\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6744 size-full alignleft\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/09\/Kadhir.png\" sizes=\"(max-width: 200px) 100vw, 200px\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/09\/Kadhir.png 200w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/09\/Kadhir-150x150.png 150w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/09\/Kadhir-96x96.png 96w\" alt=\"Kadhir\" width=\"200\" height=\"200\" \/><\/p>\n<p>Content Writer at Testleaf, specializing in SEO-driven content for test automation, software development, and cybersecurity. I turn complex technical topics into clear, engaging stories that educate, inspire, and drive digital transformation.<\/p>\n<p><strong>Ezhirkadhir Raja<\/strong><\/p>\n<p>Content Writer \u2013 Testleaf<\/p>\n<p><a href=\"http:\/\/linkedin.com\/in\/ezhirkadhir\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2025\/07\/linkedin.png\" alt=\"LinkedIn Logo\" width=\"28\" height=\"28\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I first started my journey as a QA engineer, one of the things I quickly noticed was that our test scripts were messy, brittle, and hard to maintain. Each test case was filled with dozens of assertions, hard-coded locators, and repetitive code that made debugging a nightmare. I remember sitting through test runs that &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.testleaf.com\/blog\/page-object-model-without-assertion-overload\/\"> <span class=\"screen-reader-text\">Page Object Model Done Right: Removing Assertion Overload\u00a0<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":7731,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[5],"tags":[954,953,952,807,849,883,64,46],"class_list":["post-7730","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","tag-ai-in-testing","tag-assertions","tag-pom","tag-qa","tag-qa-engineer","tag-qa-teams","tag-test-automation","tag-testing"],"acf":[],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts\/7730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/comments?post=7730"}],"version-history":[{"count":2,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts\/7730\/revisions"}],"predecessor-version":[{"id":7737,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts\/7730\/revisions\/7737"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/media\/7731"}],"wp:attachment":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/media?parent=7730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/categories?post=7730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/tags?post=7730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}