DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

Implicit Wait vs. Explicit Wait in Selenium: Key Differences and Best Practices

Implicit waits apply to element lookups across a session; explicit waits target a specific condition. Learn when to use each and why Selenium advises against mixing them.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

An implicit wait sets a session-wide timeout for finding elements; an explicit wait polls for a particular condition at the point your test needs it. For dynamic pages, explicit waits usually give you better control: wait for the element to be visible or clickable, and leave the implicit wait at zero. Selenium warns that combining the two can make total wait times unpredictable.

How implicit and explicit waits differ

Aspect Implicit wait Explicit wait
Scope Session-wide setting for element-location calls Local to a wait invocation
What it checks Whether the requested element can be found A selected condition, such as visibility or text
How it works Retries an element lookup until it succeeds or the timeout expires Repeatedly evaluates a condition until it succeeds or the timeout expires
Typical use A deliberate global policy for element lookup, used sparingly Waiting for a dynamic interface to reach the state needed for the next action
Main risk Can add delay to many lookups and slow tests A poorly chosen condition or timeout can still cause a failure

The implicit wait defaults to zero. Unless you set it, a lookup for an element that is not present fails without waiting. An implicit wait applies to finding elements; it does not make a found element visible, enabled, or ready to interact with. Selenium’s waiting strategies documentation explains both behaviors.

Use an explicit wait for a dynamic element

Choose the condition that matches the next operation. For example, if the test is about to click a button, waiting for it to be clickable is more relevant than merely checking that it exists in the DOM. Selenium’s Expected Conditions include checks for existence, visibility, staleness, visible text, and title values; available names and APIs depend on the language binding.

Python example

from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait

wait = WebDriverWait(driver, timeout=10)
button = wait.until(EC.element_to_be_clickable((By.ID, "submit")))
button.click()

This waits up to 10 seconds for the button to become clickable and proceeds as soon as the condition succeeds. The number is the timeout for this explicit wait, not a promise that the entire test step will always finish within exactly 10 seconds.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For Python, WebDriverWait polls every 0.5 seconds by default and ignores NoSuchElementException by default. Those are Python API defaults, not universal settings across Selenium bindings. The Python WebDriverWait API documents the polling interval, ignored exceptions, timeout, and timeout message options. Check the documentation for the language and version your project uses.

Why Selenium warns against mixing the waits

Selenium’s official documentation says: “Warning: Do not mix implicit and explicit waits. Doing so can cause unpredictable wait times.” An implicit wait can affect element lookups made while an explicit wait is evaluating its condition, so the explicit timeout may not act as a hard upper bound on elapsed time.

Selenium illustrates the issue with a 10-second implicit wait and a 15-second explicit wait: a timeout may occur after 20 seconds. That is an example from Selenium’s documentation, not a benchmark or a guarantee that every driver will behave identically. To avoid this interaction, leave the implicit wait at zero when using explicit waits.

Set an implicit wait only for a deliberate global policy

If your team intentionally wants element-location calls to wait session-wide, set the implicit timeout using the API for your binding. Selenium’s Java documentation shows this form:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2));

Use a nonzero value judiciously. A longer implicit timeout can increase test runtime, particularly with slower locator strategies such as XPath, as noted in the Java WebDriver.Timeouts API. Selenium’s first-script tutorial describes implicit wait as “rarely the best solution,” while using it as a placeholder in a beginner example: First Selenium script.

Navigation completion is not application readiness

Navigation commands wait for the page-load strategy’s configured readyState, which defaults to complete. That state covers HTML-defined assets; it does not ensure that JavaScript has finished updating the interface or that the element your test needs is ready. After navigation, wait for the relevant state—such as a button becoming clickable or a spinner disappearing—instead of relying on a fixed sleep.

Choose the wait that matches the job

  • Waiting for a specific interface state: use an explicit wait for the condition needed by the next step.
  • Considering a global delay on every lookup: use an implicit wait only if that session-wide behavior is intentional and its effect on runtime is acceptable.
  • Using explicit waits: keep the implicit wait at zero to avoid unpredictable combined timing.
  • Writing a fixed sleep: prefer waiting for the required condition; an arbitrary delay can be too short when a page is slow and waste time when it is fast.

Troubleshooting wait failures

The lookup fails immediately

The implicit wait is zero by default. If the element may appear later, use an explicit wait for its expected state rather than assuming the lookup will pause.

The element is found but cannot be clicked

An implicit wait only concerns finding elements; it does not wait for visibility or clickability. Wait explicitly for a condition appropriate to the action, such as clickability.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The explicit wait appears to exceed its timeout

Check whether a nonzero implicit wait is also active. Selenium documents that mixing the two can produce unpredictable elapsed times. Set the implicit wait to zero when relying on explicit waits.

The test proceeds after navigation but the page is not ready

A completed navigation state does not guarantee that JavaScript-driven changes have reached the state your test needs. Add an explicit wait for that application state rather than extending a fixed sleep.

The expected-condition import or method is unavailable

Confirm the API for your language binding and Selenium version. Expected Conditions support varies; Selenium notes that .NET stopped supporting Expected Conditions in Selenium 4. See the official Expected Conditions documentation for binding-specific guidance.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is a screenshot rather than an interaction test, ScreenshotNeo returns a website screenshot or PDF from one GET request. For example, using cURL:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners, popups, and chat widgets are removed before capture; bot checks, blank pages, and failed loads are never billed. An MCP server provides screenshot tools for AI agents, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for free ScreenshotNeo screenshots.

Frequently Asked Questions

Does an implicit wait make an element visible?

No. It waits on element-location calls; use an explicit wait for visibility or another required state.

Can an explicit wait finish before its timeout?

Yes. It proceeds as soon as its chosen condition succeeds.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.