If a Selenium click does not navigate, do not wait for navigation. Wait for the specific result the click should cause instead: an element appearing, text changing, an old element becoming stale, a new window opening, or an alert appearing. First identify which Selenium call actually timed out; then match its wait condition to the page’s expected behavior. A longer timeout cannot fix a condition that never becomes true.
First find out what timed out
“Timeout after click” can describe different failures. The click may return successfully and a later wait may time out; a navigation command may be waiting for the browser’s configured document readiness state; or a script or page-load timeout may occur elsewhere. Read the exception and stack trace and identify the exact line that raised it before changing a timeout.
- A
TimeoutExceptionfromWebDriverWait.until: the selected condition did not become truthy within the wait’s limit. - A navigation or page-load timeout: Selenium was waiting on a document-loading operation, not necessarily on the application update you intended to test.
- A different interaction error: a click-intercepted, stale-element, or no-such-element error is not fixed by increasing a wait duration. Address the interaction, element reference, or locator that produced that error.
Selenium’s navigation commands wait for a configured document readyState; the default target is complete. That is a document-loading signal, not a guarantee that later JavaScript work or an application’s asynchronous update has finished. Single-page applications often update the current document without changing its URL. A button can therefore work as intended even though no navigation happens.
Choose the condition that matches the result
Before writing a wait, describe the expected change in observable terms. “The click finished” is not enough: the browser can dispatch a click before an asynchronous request or UI update completes. Wait for the state your test needs to use or verify.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
| Expected result | Useful condition |
|---|---|
| Content is added or revealed on the current page | Presence or visibility of the expected element |
| Existing content changes | Expected text or an application-specific condition |
| An existing element is removed or replaced | Staleness of the old element |
| The browser navigates | The expected URL or a destination-page condition |
| A new tab or window opens | The expected window count, followed by switching to the new window if needed |
| A browser alert appears | Alert presence |
Use a condition tied to the action’s intended outcome, rather than checking an unrelated element that happened to be visible before the click. For text updates, check the expected new text, not merely that the element exists. For a replaced view, locate the old element before clicking if you intend to wait for that specific element to become stale.
Python example: wait for an in-page update
This self-contained demonstration opens a small page, clicks a button that reveals content without navigation, and waits for that content to become visible. It uses Selenium’s Python API and assumes Selenium is installed, with a compatible Chrome browser and driver available to webdriver.Chrome(). It is an example of the synchronization pattern, not a claim that these locators or a 10-second limit fit every application.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
from urllib.parse import quote
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
html = """<!doctype html>
<html>
<body>
<button id="reveal" onclick="document.getElementById('revealed').hidden = false">
Reveal
</button>
<p id="revealed" hidden>The updated content is visible.</p>
</body>
</html>"""
url = "data:text/html;charset=utf-8," + quote(html)
driver = webdriver.Chrome()
try:
driver.get(url)
wait = WebDriverWait(driver, 10)
driver.find_element(By.ID, "reveal").click()
revealed = wait.until(
EC.visibility_of_element_located((By.ID, "revealed"))
)
print(revealed.text)
finally:
driver.quit()
The important sequence is click() followed by until() on the expected post-click state. Replace the demonstration page and IDs with your application’s URL, click target, and actual outcome. Selenium Python’s WebDriverWait polls every 0.5 seconds by default, ignores NoSuchElementException by default, and raises TimeoutException if the condition does not become truthy in time. The Python API details here are specific to Selenium Python 4.49.0; other language bindings use their own syntax.
Use a different wait for navigation, replacement, windows, or alerts
Navigation to a known URL
If the click should navigate, wait for the expected URL rather than for an element that belongs only to the old page. When the destination’s content is the meaningful outcome, wait for that destination content as well. A URL change alone does not establish that every application-specific task on the destination is finished.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
driver.find_element(By.ID, "continue").click()
wait.until(EC.url_to_be("https://example.com/next"))
Use the destination URL your application actually produces. If it includes dynamic query parameters or redirects, choose a URL condition that matches the stable, expected part of the result instead of guessing an exact string.
A replaced element or view
If the old element should be detached from the document, retain its reference before clicking and wait for staleness. This checks that the old reference is no longer attached; it does not by itself prove that the replacement view is ready.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
old_view = driver.find_element(By.ID, "results")
driver.find_element(By.ID, "refresh").click()
wait.until(EC.staleness_of(old_view))
wait.until(EC.visibility_of_element_located((By.ID, "results")))
A new tab or window
Record the existing window handles before the click, then wait for the count to increase. Afterward, switch to the newly opened handle before locating content there; element searches still apply to the current browsing context.
before = set(driver.window_handles)
driver.find_element(By.ID, "open-report").click()
wait.until(EC.number_of_windows_to_be(len(before) + 1))
new_handle = (set(driver.window_handles) - before).pop()
driver.switch_to.window(new_handle)
A browser alert
When the expected result is a browser alert, wait for the alert condition and then interact with the alert. Waiting for page content will not detect that browser state.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
driver.find_element(By.ID, "confirm-action").click()
alert = wait.until(EC.alert_is_present())
alert.accept()
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Fix the cause when the right wait still times out
- Verify that the click occurred. Check that the locator identifies the intended control, that the click line completed, and that the control is in the current page, frame, and window. A click on a different control cannot produce the expected state.
- Verify the application’s actual behavior. Observe whether the click changes the URL, reveals content, changes text, replaces a view, opens a window, or raises an alert. Choose the condition based on what happens in the application, not what the control’s appearance suggests.
- Check the locator and state. Confirm that the post-click element is the one your condition targets and that its expected state can occur. If the locator points to a different element, the wait can be correct in form but impossible to satisfy.
- Check the browsing context. Make sure the driver is in the intended frame and window. A condition evaluated against the wrong context will not see the result.
- Check your configured waits. Selenium warns that mixing implicit and explicit waits can make total wait times unpredictable. Prefer a deliberate explicit wait for the outcome rather than layering implicit and explicit waiting and trying to infer a precise total duration.
- Only then reconsider the duration. A slower legitimate application response may need more time, but increasing the timeout is useful only if the selected condition eventually becomes true. Selenium does not prescribe one universal timeout for every application.
Common timeout patterns and what to change
| Symptom | Likely mismatch | Next step |
|---|---|---|
| The URL stays the same, but the page visibly changes | The test is waiting for navigation on an in-page update | Wait for the new element, changed text, or other visible result. |
| The click returns, then an explicit wait times out | The expected condition was never satisfied, or its locator/state is wrong | Inspect the target state and verify the locator, context, and expected behavior. |
| A page-load wait times out after an action | The browser is waiting on document readiness, while the desired signal may be an application-level state | Identify the timed-out command; use a state-specific wait for an in-page change. |
| The old element remains in the page while its content changes | A staleness wait expects removal that does not happen | Wait for the new text or another changed property instead. |
| A new page opens but the test cannot find its elements | The driver may still be in the original window | Wait for the window count and switch to the new handle. |
| The timeout varies unexpectedly | Implicit and explicit waits may be combined | Review global implicit-wait configuration and avoid mixing the two strategies. |
Or skip the browser setup
ScreenshotNeo is a screenshot API, not a Selenium wait-condition fix: it cannot make a Selenium predicate become true. It can provide a screenshot of a URL for visual inspection when you need to see the rendered page. The one-request API accepts a URL and returns a PNG, JPEG, WebP, or PDF; its documented options include custom waits and full-page capture. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server gives AI agents tools for screenshots, page information, and PDF capture. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Learn more at ScreenshotNeo.
Sign up free for 1,000 screenshots a month with no card.
What to include if the timeout persists
A general wait pattern cannot identify a page-specific defect without the failing details. To narrow it down, capture the exact exception and stack-trace line, Selenium language and version, browser and driver context, configured implicit/page-load/script timeouts, the click locator, and the state the click is supposed to produce. With those details, the next step is to determine whether the click itself failed or a particular post-click condition failed to occur.
Quick Recap
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.

