October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Use Implicit Waits in Selenium C#

Use Selenium's C# ImplicitWait property to allow element lookups to retry briefly. See how to set it, what it covers, and when an explicit wait is the better fit.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set an implicit wait on the WebDriver session with driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(2);. Selenium then allows element-location calls to wait for a matching element to appear, up to that duration. The setting applies broadly to lookups; it does not wait for an element to become visible or clickable.

Set an implicit wait in Selenium C#

Use the ImplicitWait property on the driver’s timeout settings. It takes a TimeSpan:

driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(2);

The two-second value matches an illustrative duration in Selenium’s official example; it is not a universal recommendation. The default implicit wait is zero, so a lookup for a missing element fails immediately. Selenium: Waiting Strategies

Complete C# example

This example clicks a control that adds an element dynamically, then looks up the new element. It follows Selenium’s documented C# usage and adds a try/finally block to close the browser even if an operation fails.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
using System;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;

IWebDriver driver = new ChromeDriver();
try
{
    driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(2);

    driver.Navigate().GoToUrl("https://www.selenium.dev/selenium/web/dynamic.html");
    driver.FindElement(By.Id("adder")).Click();

    IWebElement added = driver.FindElement(By.Id("box0"));
    // Continue with the element after FindElement returns.
}
finally
{
    driver.Quit();
}

The timeout is set after creating the driver and before navigation or element lookups. If box0 appears within the configured interval, FindElement returns its reference; if it does not, Selenium throws NoSuchElementException.

What an implicit wait does—and does not do

An implicit wait is a session-wide setting for element-location calls. For a single-element lookup, Selenium keeps searching until it finds a match or the timeout expires. For a multi-element lookup, it waits until at least one match is found or the timeout expires. The .NET API defines the property as a TimeSpan. Selenium .NET ITimeouts API

  • It waits for presence in a lookup. Once a matching element is located, the call returns.
  • It does not wait for a later state. Presence alone does not establish that the element is visible, enabled, clickable, or ready for an application-specific action.
  • It applies to lookups throughout the session. It is not attached to one locator or one particular condition.

For a particular state, use an explicit wait instead. Selenium’s C# API provides WebDriverWait for condition-based polling. Selenium .NET WebDriverWait API

Choose a timeout without slowing every lookup

A longer implicit wait is not automatically a pause of that length: if a lookup finds its element earlier, it returns early. But unsuccessful searches can take longer, and the setting affects element-location calls across the session. Selenium advises using increases judiciously; slower locator strategies, such as XPath, can add runtime cost. Selenium .NET ITimeouts API

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use an implicit wait when a modest, shared allowance for briefly delayed element presence suits the test.
  • Use an explicit wait when the test needs a specific condition, such as visibility, to become true.
  • Do not set both kinds of wait together. Selenium warns that mixing them can produce unpredictable durations: its example notes that a 10-second implicit wait combined with a 15-second explicit wait could time out after 20 seconds. Selenium: Waiting Strategies

Use an explicit wait for a specific condition

When the requirement is more than element presence, wait for the relevant condition explicitly. Selenium’s .NET WebDriverWait API uses a TimeSpan timeout. Keep the implicit wait at its default of zero if you use explicit waits, rather than combining the two mechanisms. Selenium .NET WebDriverWait API

Troubleshooting implicit waits

NoSuchElementException still occurs

Check that the locator identifies the element and that the element appears before the configured timeout expires. An implicit wait only retries the lookup; it cannot make an incorrect locator match.

The test finds the element but cannot interact with it

The element may exist in the DOM before it is visible or usable. Implicit wait ends when the lookup succeeds, so wait explicitly for the state your next action requires.

Tests take longer than expected

Every unsuccessful lookup can use some or all of the implicit-wait interval. Review the session-wide timeout and locator strategy. Also check that implicit and explicit waits are not mixed, which Selenium identifies as a source of unpredictable durations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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 to capture a web page rather than test browser interactions, ScreenshotNeo offers a website screenshot API and MCP server. One GET request can return an image or PDF without you setting up Selenium or a browser driver. Cookie banners are accepted and removed before the shot, along with known newsletter popups and chat widgets; bot checks, blank pages, timeouts and failed loads are not billed. An MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.

See the ScreenshotNeo API documentation for request options. For example, save a WebP screenshot of a page with:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Learn about ScreenshotNeo or sign up for 1,000 free screenshots a month with no card.

Further Selenium documentation

Selenium’s getting-started guide also includes a C# implicit-wait example: Organizing and Executing Selenium Code.

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

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.

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. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.