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

Use isDisplayed() on a located Selenium WebElement to ask whether Selenium currently considers it displayed. In Python, the method is spelled is_displayed(); in JavaScript, await its promise. The result is a displayedness check, not proof that a click or other interaction will succeed. If the page is still changing, wait for visibility rather than checking once too early.

Call the method on a located element

First find the element with the locator strategy your test uses. Then call the method on that element. The method returns a Boolean in Python and Java, and a promise resolving to a Boolean in JavaScript.

Python

from selenium.webdriver.common.by import By

button = driver.find_element(By.ID, "submit")
if button.is_displayed():
    print("Selenium reports the element as displayed")

The Python spelling uses an underscore: is_displayed().

Java

WebElement button = driver.findElement(By.id("submit"));
if (button.isDisplayed()) {
    System.out.println("Selenium reports the element as displayed");
}

The Java method is isDisplayed() and returns boolean.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • 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.

JavaScript

const button = await driver.findElement(By.id('submit'));
const displayed = await button.isDisplayed();

if (displayed) {
  console.log('Selenium reports the element as displayed');
}

In the JavaScript binding, await isDisplayed() because it returns a Promise<boolean>. These examples show the method syntax; use the imports, driver setup and locator conventions appropriate to your project and installed Selenium version.

What the returned value means

The result represents Selenium’s assessment of whether the connected element is displayed in the current browsing context. It is not a precise measurement of what every person would perceive as visible. Selenium’s documentation notes that the W3C WebDriver specification mentions displayedness but does not fully define its behavior, so Selenium uses an approximation based on the element and its relationship in the document tree.

  • true means Selenium’s displayedness check considers the element displayed.
  • false means that check does not consider it displayed.
  • Neither value establishes that the element is enabled, unobstructed, or ready for a successful interaction.

Choose between an immediate check and a wait

A direct call checks the element’s state at that moment. On a dynamic page, the element may not yet exist or may not yet be visible when the check runs. Use an explicit wait when the test needs to wait for a state transition.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 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.

Wait for visibility in Python

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

button = WebDriverWait(driver, 10).until(
    EC.visibility_of_element_located((By.ID, "submit"))
)

visibility_of_element_located waits for an element to be present in the DOM and have non-zero width and height. The ten-second timeout is an example, not a performance recommendation. The described expected-condition API is documented in Selenium Python API reference version 4.50.0; check the reference matching the version installed in your project.

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

Wait for clickability when that is the actual need

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

In the Python expected-conditions API, element_to_be_clickable requires the element to be visible and enabled. It still cannot guarantee that a click will succeed if, for example, another element covers the click point.

Displayed does not necessarily mean clickable

Selenium performs additional checks for interactions. An element outside the viewport may be scrolled into view; Selenium also checks whether it is displayed and interactable. If it is not displayed or is not keyboard- or pointer-interactable, an interaction can fail with an element-not-interactable error. If the center point of a click is obscured, Selenium can report an element-click-intercepted error.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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.
  • For a yes-or-no check of current displayedness, call is_displayed() or isDisplayed().
  • For a changing page, wait for a visibility condition instead of polling the immediate check without a wait.
  • When you intend to click, use a clickability condition where available and handle interaction failures; displayedness alone does not test obstruction.

Troubleshooting

The locator fails before the method runs

isDisplayed() is an element method, so it cannot be called until Selenium has located an element. Check the locator and whether the element exists in the current browsing context. For an element rendered later, wait for it to be present or visible.

The check returns false but the page appears to show the control

The method reports Selenium’s approximation, not a universal visual judgment. Check that the test is examining the intended element and browsing context, and consider whether the page has finished updating before the check.

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

The check returns true but click fails

Displayedness does not establish enabled state or ensure that the click point is unobstructed. Wait for clickability when appropriate, then investigate whether an overlay or other page content intercepts the interaction.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • 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

The test is flaky on a dynamic page

A single immediate check can run before the target reaches the desired state. Replace it with an explicit wait for the relevant condition and choose a timeout that suits the application and test environment.

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 page rather than interact with it in a Selenium test, ScreenshotNeo is a website screenshot API and MCP server. One GET request can return an image or PDF; the API accepts options for captures such as full-page shots and custom viewport sizes.

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 parameters. It accepts cookie banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and responses identify the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, including Claude, Cursor and other MCP clients. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Sign up for ScreenshotNeo to get 1,000 free screenshots a month with no card.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.

Frequently Asked Questions

Is the method named isDisplayed() in every Selenium language?

No. Python spells it is_displayed(); Java uses isDisplayed(), as does JavaScript, where the result is a promise.

Does isDisplayed() return a string?

No. It returns a Boolean result (or a promise resolving to a Boolean in JavaScript).

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.