{"id":8501,"date":"2026-01-02T14:47:57","date_gmt":"2026-01-02T09:17:57","guid":{"rendered":"https:\/\/www.testleaf.com\/blog\/?p=8501"},"modified":"2026-01-02T14:50:51","modified_gmt":"2026-01-02T09:20:51","slug":"selenium-explicit-waits-spinners-modals-popups","status":"publish","type":"post","link":"https:\/\/www.testleaf.com\/blog\/selenium-explicit-waits-spinners-modals-popups\/","title":{"rendered":"Selenium: How to Wait Properly for Loading Screens and Pop-ups"},"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-8501-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Selenium-How-to-Wait-Properly-for-Loading-Screens-and-Pop-ups.mp3?_=1\" \/><a href=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Selenium-How-to-Wait-Properly-for-Loading-Screens-and-Pop-ups.mp3\">https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Selenium-How-to-Wait-Properly-for-Loading-Screens-and-Pop-ups.mp3<\/a><\/audio>\n<p>&nbsp;<\/p>\n<p>In UI automation, most \u201crandom\u201d failures are not really random.<br \/>\nThe page is still loading.<br \/>\nThe spinner is still spinning.<br \/>\nThe modal is fading in.<br \/>\nThe network call is not done yet.<\/p>\n<p>Your script is simply <strong>too fast<\/strong>.<\/p>\n<p>That\u2019s where <a href=\"https:\/\/www.testleaf.com\/blog\/how-to-use-auto-wait-and-explicit-wait-in-playwright-beginners-guide\/\"><strong>explicit waits<\/strong><\/a> in Selenium come in. They are the difference between \u201cclick-click-fail\u201d and a test that behaves like a patient user.<\/p>\n<p>In this blog we\u2019ll look at three common troublemakers:<\/p>\n<ul>\n<li>Loading <strong>spinners<\/strong><\/li>\n<li>Blocking <strong>modals<\/strong><\/li>\n<li>\u201c<strong>Network idle<\/strong>\u201d moments (background calls still running)<\/li>\n<\/ul>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-8503\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/UI-Timing-Trouble-Makers-What-to-Wait-For.jpg\" alt=\"UI Timing Trouble Makers + What to Wait For\" width=\"1280\" height=\"720\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/UI-Timing-Trouble-Makers-What-to-Wait-For.jpg 1280w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/UI-Timing-Trouble-Makers-What-to-Wait-For-300x169.jpg 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/UI-Timing-Trouble-Makers-What-to-Wait-For-1024x576.jpg 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/UI-Timing-Trouble-Makers-What-to-Wait-For-768x432.jpg 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/UI-Timing-Trouble-Makers-What-to-Wait-For-150x84.jpg 150w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p>\n<p>\u2026and how to handle them with Selenium\u2019s <a href=\"https:\/\/www.testleaf.com\/blog\/explicit-waits-vs-hard-sleeps-test-automation\/\">explicit waits<\/a>.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Why_implicit_waits_are_not_enough\"><\/span><strong>Why implicit waits are not enough<\/strong><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\/selenium-explicit-waits-spinners-modals-popups\/#Why_implicit_waits_are_not_enough\" >Why implicit waits are not enough<\/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\/selenium-explicit-waits-spinners-modals-popups\/#FAQs\" >FAQs<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>Many teams start with <strong>implicit waits<\/strong>:<\/p>\n<pre>driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));<\/pre>\n<p>This tells Selenium, \u201cIf you don\u2019t find an element, keep trying for up to 10 seconds.\u201d<\/p>\n<p>Sounds nice, but:<\/p>\n<ul>\n<li>It applies to <strong>all<\/strong> element lookups.<\/li>\n<li>It doesn\u2019t express <strong>what<\/strong> you\u2019re really waiting for (spinner to disappear? modal to close?).<\/li>\n<li>It can hide real timing issues and make <a href=\"https:\/\/www.testleaf.com\/blog\/free-playwright-tutorial-visual-debugging-with-playwright-inspector\/\">debugging harder<\/a>.<\/li>\n<\/ul>\n<p>Explicit waits are better because you say:<\/p>\n<p>\u201cWait for this <strong>specific condition<\/strong> before continuing.\u201d<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-8505\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Implicit-Waits-vs-Explicit-Waits-Why-Explicit-Wins.jpg\" alt=\"Implicit Waits vs Explicit Waits (Why Explicit Wins)\" width=\"1280\" height=\"720\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Implicit-Waits-vs-Explicit-Waits-Why-Explicit-Wins.jpg 1280w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Implicit-Waits-vs-Explicit-Waits-Why-Explicit-Wins-300x169.jpg 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Implicit-Waits-vs-Explicit-Waits-Why-Explicit-Wins-1024x576.jpg 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Implicit-Waits-vs-Explicit-Waits-Why-Explicit-Wins-768x432.jpg 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Implicit-Waits-vs-Explicit-Waits-Why-Explicit-Wins-150x84.jpg 150w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p>\n<p><strong>Other Helpful Articles:<\/strong> <a href=\"https:\/\/www.testleaf.com\/blog\/top-30-playwright-interview-questions-and-answers-2025-updated-guide\/\">playwright interview questions<\/a><\/p>\n<h3><strong>1. Waiting for spinners to disappear<\/strong><\/h3>\n<p>Common pattern:<\/p>\n<ol>\n<li>User clicks a button.<\/li>\n<li>A spinner appears (e.g., \u201cLoading\u2026\u201d).<\/li>\n<li>When the spinner disappears, new content is ready.<\/li>\n<\/ol>\n<p>If you try to click or assert elements while the spinner is still visible, your test may fail or click behind it.<\/p>\n<p><strong>HTML idea:<\/strong><\/p>\n<pre>&lt;div class=\"spinner\" id=\"loadingSpinner\"&gt;&lt;\/div&gt;<\/pre>\n<p><strong><a href=\"https:\/\/www.testleaf.com\/blog\/hexaware-java-interview-questions-and-answers-2025-top-faqs-to-crack-your-interview\/\">Selenium (Java)<\/a> idea:<\/strong><\/p>\n<pre>WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));\r\n\r\n\/\/ Wait for spinner to become invisible\r\n\r\nwait.until(ExpectedConditions.invisibilityOfElementLocated(\r\n\r\n\u00a0\u00a0\u00a0 By.id(\"loadingSpinner\")\r\n\r\n));\r\n\r\n\/\/ Now it\u2019s safe to interact with the page\r\n\r\ndriver.findElement(By.id(\"proceedButton\")).click();<\/pre>\n<p>Key idea: you\u2019re not just waiting for an element to be present; you\u2019re waiting for it to <strong>go away<\/strong>.<\/p>\n<h3><strong>2. Waiting for modals to open &amp; close<\/strong><\/h3>\n<p>Modals are those pop-up windows that sit on top of the page:<\/p>\n<ul>\n<li>Login dialogs<\/li>\n<li>Confirm delete<\/li>\n<li>Payment steps<\/li>\n<\/ul>\n<p>Race condition example:<\/p>\n<ul>\n<li>Test clicks \u201cDelete\u201d.<\/li>\n<li>Modal is animating in.<\/li>\n<li>Test instantly tries to click \u201cConfirm\u201d inside the modal.<\/li>\n<li>Selenium throws an error: element not clickable \/ not found.<\/li>\n<\/ul>\n<p>You need to:<\/p>\n<ol>\n<li>Wait for the modal to <strong>appear<\/strong>.<\/li>\n<li>Interact with elements <strong>inside<\/strong> it.<\/li>\n<li>Wait for the modal to <strong>disappear<\/strong> when done.<\/li>\n<\/ol>\n<p><strong>Example:<\/strong><\/p>\n<pre>WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));\r\n\r\n\/\/ Step 1: open modal\r\n\r\ndriver.findElement(By.id(\"deleteButton\")).click();\r\n\r\n\r\n\/\/ Step 2: wait for modal visible\r\n\r\nWebElement modal = wait.until(ExpectedConditions.visibilityOfElementLocated(\r\n\r\n\u00a0\u00a0\u00a0 By.id(\"confirmDeleteModal\")\r\n\r\n));\r\n\r\n\/\/ Step 3: click confirm inside modal\r\n\r\nmodal.findElement(By.cssSelector(\"[data-testid='confirm-delete']\")).click();\r\n\r\n\/\/ Step 4: wait for modal to close (invisible or gone)\r\n\r\nwait.until(ExpectedConditions.invisibilityOfElementLocated(\r\n\r\n\u00a0\u00a0\u00a0 By.id(\"confirmDeleteModal\")\r\n\r\n));<\/pre>\n<p>Now your script respects the lifecycle of the modal instead of racing ahead.<\/p>\n<h3><strong>3. Approximating \u201cnetwork idle\u201d in <a href=\"https:\/\/www.testleaf.com\/blog\/selenium-locators-test-hooks-stable-ui-tests\/\">Selenium<\/a><\/strong><\/h3>\n<p>Selenium itself doesn\u2019t have a direct \u201cwait until no network calls\u201d method like some newer tools. But we can <strong>approximate<\/strong> \u201cnetwork idle\u201d by:<\/p>\n<ul>\n<li>Waiting for a specific <strong>element<\/strong> that only appears when data is loaded, or<\/li>\n<li>Waiting for the <strong>number of items<\/strong> in a list to be &gt; 0, or<\/li>\n<li>Using JavaScript hooks (for advanced users).<\/li>\n<\/ul>\n<p>A simple, practical pattern:<\/p>\n<p>\u201cWait until the main content list is visible and has at least one item.\u201d<\/p>\n<pre>Example:\r\n\r\nWebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(15));\r\n\r\n\r\n\/\/ Wait for list container to be visible\r\n\r\nWebElement list = wait.until(ExpectedConditions.visibilityOfElementLocated(\r\n\r\n\u00a0\u00a0\u00a0 By.id(\"orderList\")\r\n\r\n));\r\n\r\n\/\/ Wait until at least one row appears\r\n\r\nwait.until(driver -&gt; list.findElements(By.cssSelector(\".order-row\")).size() &gt; 0);\r\n\r\nYou\u2019re not really watching the network, but you are watching the <strong>result<\/strong> of the network completing.<\/pre>\n<h3><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><\/h3>\n<h3><strong>4. Avoiding \u201csleep\u201d unless absolutely necessary<\/strong><\/h3>\n<p>Thread.sleep(5000); is tempting. It seems simple:<\/p>\n<p>\u201cJust wait 5 seconds and then it will be ready.\u201d<\/p>\n<p>But it has problems:<\/p>\n<ul>\n<li>Sometimes 5 seconds is not enough \u2192 <a href=\"https:\/\/www.testleaf.com\/blog\/retry-logic-ci-cd-handle-flaky-tests\/\">flakiness<\/a>.<\/li>\n<li>Sometimes 5 seconds is too much \u2192 tests are slow.<\/li>\n<li>It doesn\u2019t adapt to faster or slower environments.<\/li>\n<\/ul>\n<p>Explicit waits with conditions are:<\/p>\n<ul>\n<li><strong>Smart<\/strong> (stop as soon as condition is true)<\/li>\n<li><strong>Adaptive<\/strong> (can handle slow and fast runs)<\/li>\n<li>Easier to reason about (\u201cwait until spinner gone\u201d instead of \u201chope 5s is enough\u201d).<\/li>\n<\/ul>\n<p><strong>Recommended for You:<\/strong> <a href=\"https:\/\/www.testleaf.com\/blog\/100-manual-testing-interview-questions-and-answers-2025\/\">manual testing interview questions<\/a><\/p>\n<h3><strong>5. A small checklist for stable Selenium waits<\/strong><\/h3>\n<p>When you face flakiness:<\/p>\n<ol>\n<li><strong>Identify the <a href=\"https:\/\/en.wikipedia.org\/wiki\/User_interface\">UI<\/a> event:<\/strong>\n<ul>\n<li>Spinner?<\/li>\n<li>Modal?<\/li>\n<li>Async list?<\/li>\n<\/ul>\n<\/li>\n<li><strong>Add explicit waits<\/strong> for:\n<ul>\n<li><strong>Appearance<\/strong> when you need it (modal showing).<\/li>\n<li><strong>Disappearance<\/strong> when it should be gone (spinner or overlay).<\/li>\n<li><strong>Content readiness<\/strong> (list &gt; 0 items, a specific label is visible).<\/li>\n<\/ul>\n<\/li>\n<li><strong>Avoid mixing<\/strong> large implicit waits + explicit waits everywhere.<\/li>\n<li><strong>Reduce sleeps<\/strong> to only rare cases where no clear condition exists.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-8504\" src=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Stable-Waiting-Checklist-Do-This-Avoid-That.jpg\" alt=\"Stable Waiting Checklist (Do This, Avoid That)\" width=\"1280\" height=\"720\" srcset=\"https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Stable-Waiting-Checklist-Do-This-Avoid-That.jpg 1280w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Stable-Waiting-Checklist-Do-This-Avoid-That-300x169.jpg 300w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Stable-Waiting-Checklist-Do-This-Avoid-That-1024x576.jpg 1024w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Stable-Waiting-Checklist-Do-This-Avoid-That-768x432.jpg 768w, https:\/\/www.testleaf.com\/blog\/wp-content\/uploads\/2026\/01\/Stable-Waiting-Checklist-Do-This-Avoid-That-150x84.jpg 150w\" sizes=\"(max-width: 1280px) 100vw, 1280px\" \/><\/p>\n<p>With a bit of discipline, smart <a href=\"https:\/\/www.testleaf.com\/blog\/explicit-waits-vs-hard-sleeps-test-automation\/\">explicit waits<\/a> turn Selenium from \u201cfragile and flaky\u201d into a reliable part of your release pipeline.<\/p>\n<p>&nbsp;<\/p>\n<h2 data-start=\"5465\" data-end=\"5485\"><span class=\"ez-toc-section\" id=\"FAQs\"><\/span><strong>FAQs<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p data-start=\"5487\" data-end=\"5650\"><strong data-start=\"5487\" data-end=\"5531\">1) What is an explicit wait in Selenium?<\/strong><br data-start=\"5531\" data-end=\"5534\" \/>An explicit wait pauses the test until a specific condition is true (like element visible, clickable, or invisible).<\/p>\n<p data-start=\"5652\" data-end=\"5880\"><strong data-start=\"5652\" data-end=\"5693\">2) Why are <a href=\"https:\/\/www.selenium.dev\/documentation\/webdriver\/waits\/\">implicit waits<\/a> not enough?<\/strong><br data-start=\"5693\" data-end=\"5696\" \/>Implicit waits apply to all lookups and don\u2019t express real conditions like \u201cspinner disappears\u201d or \u201cmodal closes,\u201d making tests harder to debug.<\/p>\n<p data-start=\"5652\" data-end=\"5880\"><strong data-start=\"5882\" data-end=\"5938\">3) How do I wait for a loading spinner to disappear?<\/strong><br data-start=\"5938\" data-end=\"5941\" \/>Use <code data-start=\"5945\" data-end=\"6001\">ExpectedConditions.invisibilityOfElementLocated(By...)<\/code> so the test continues only after the spinner is gone.<\/p>\n<p data-start=\"5652\" data-end=\"5880\"><strong data-start=\"6097\" data-end=\"6143\">4) How do I handle modal pop-ups reliably?<\/strong><br data-start=\"6143\" data-end=\"6146\" \/>Wait for the modal to become visible, interact inside it, then wait for it to become invisible.<\/p>\n<p data-start=\"5652\" data-end=\"5880\"><strong data-start=\"6283\" data-end=\"6331\">5) Does Selenium have a \u201cnetwork idle\u201d wait?<\/strong><br data-start=\"6331\" data-end=\"6334\" \/>No. A practical workaround is to wait for the loaded UI result (like a list container visible and list size &gt; 0).<\/p>\n<p data-start=\"5652\" data-end=\"5880\"><strong data-start=\"6489\" data-end=\"6544\">6) Should I use <code data-start=\"6507\" data-end=\"6523\">Thread.sleep()<\/code> in <a href=\"https:\/\/www.testleaf.com\/blog\/selenium-exception-handling-guide-fix-the-5-most-common-errors\/\">Selenium tests<\/a>?<\/strong><br data-start=\"6544\" data-end=\"6547\" \/>Avoid it when possible. It can be too short (flaky) or too long (slow). Prefer explicit waits with conditions.<\/p>\n<p data-start=\"5652\" data-end=\"5880\"><strong data-start=\"6699\" data-end=\"6753\">7) Can I use implicit and explicit waits together?<\/strong><br data-start=\"6753\" data-end=\"6756\" \/>It\u2019s usually better to keep implicit waits minimal, because mixing large implicit waits with explicit waits can create unpredictable delays.<\/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?utm_source=blog_post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Advanced Selenium Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/playwright.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Playwright Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/genai-qa-engineers-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Gen AI Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/aws-cloud-architect-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>AWS Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/rest-api-testing-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>REST API Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/full-stack-developer-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Full Stack Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/appium-mobile-automation-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>Appium Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/dev-ops-master-certification-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><strong>DevOps Training<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.testleaf.com\/course\/apache-jmeter-testing-training-course.html?utm_source=blog-post&amp;utm_medium=Organic&amp;utm_campaign=Blog_Post\"><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<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; In UI automation, most \u201crandom\u201d failures are not really random. The page is still loading. The spinner is still spinning. The modal is fading in. The network call is not done yet. Your script is simply too fast. That\u2019s where explicit waits in Selenium come in. They are the difference between \u201cclick-click-fail\u201d and a &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.testleaf.com\/blog\/selenium-explicit-waits-spinners-modals-popups\/\"> <span class=\"screen-reader-text\">Selenium: How to Wait Properly for Loading Screens and Pop-ups<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":8502,"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":[16],"tags":[786,70,29,830,158,91,93],"class_list":["post-8501","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-selenium","tag-java-selenium","tag-learn-selenium","tag-selenium","tag-selenium-frameworks","tag-selenium-interview","tag-selenium-testing","tag-selenium-testing-in-india"],"acf":[],"aioseo_notices":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts\/8501","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=8501"}],"version-history":[{"count":3,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts\/8501\/revisions"}],"predecessor-version":[{"id":8509,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/posts\/8501\/revisions\/8509"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/media\/8502"}],"wp:attachment":[{"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/media?parent=8501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/categories?post=8501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testleaf.com\/blog\/wp-json\/wp\/v2\/tags?post=8501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}