Element Not Interactable Exception in Selenium [2026]
On This Page What is an ElementNotInteractable Exception?January 03, 2026 · 10 min read · Tool Comparison
Ever snap on a perfectly seeable ingredient in —only to be met with anElementNotInteractableException? Many testers adopt this exception occur only when an ingredient is lose or incorrectly place. I habituate to think the same, until atryout continue fail even though the element was clearly present on the page. I examine rechecking locators, adding waits, and rerunning the test multiple times, but null look to act. That ’ s when it turn open thatvisibility only doesn ’ t guarantee interactability. Factors likehidden province, overlapping elements, or clock issuecan forbid interactions even when the element live in the DOM. ElementNotInteractableException is thrown in Selenium when an element exists in the DOM but can not be interacted with, such as when it is hidden, disabled, or not in a usable state at the clip of interaction. Common Causes of ElementNotInteractableException: Solutions to Handle ElementNotInteractableException: This article explains what the ElementNotInteractableException is, why it occurs, and how to handle it efficaciously in Selenium, helping you build more stable and reliable tests. ElementNotInteractable Exceptionis thrown by Selenium WebDriver when the element is present in the DOM but not in an interactable state. One of the easiest fashion to cover exception is by habituate hold till the element is Located or go clickable. Element Not Interactable Exception includes an element that is not displayed or whose center point can not be scrolled into the viewport. The constituent in Element Not Interactable elision is not interactable as it can not be click and send keys can not work since the element is either not seeable or obscure, disabled, outside the viewport and inaccessible, overlapped by another element, or not altogether supply on the page. These issue often coat just under specific browser, OS, or device conditions, making them hard to reproduce topically. Platforms like assist teams run Selenium tests on existent browsers and devices, capturing screenshots, logs, and videos to clearly identify why an element isn ’ t interactable and resolve failure faster. ElementNotInteractable exception occurs in Selenium when an try is made to interact with a web constituent but the factor is not in a status to be interacted with. Here are the potential reasons for this exception to occur: According to Crissy Joshua, a software quiz expert, a reliable way to avoid this exception is tovalidate both visibility and interactability before performing actions, rather than relying only on element front. This approach reduces freakish failures and ensures interaction happen just when the element is truly ready for user stimulation. Read More: ElementNotInteractableExceptioncan entirely be handled by get the web constituent to be interactable. Different approaches should be implemented to make the web element interactable before essay to interact with it such as scroll until the web element is in scene, enable the web ingredient if disabled or utilise a retry mechanism. Below are some of the common manner to handle this elision. To make the web element interactable implement explicit postponement as it allows to look for a specific condition to be met before performing the next action. UseWebDriverWaitalong withExpectedConditions as below: For autonomous testing across multiple user personas, check out SUSATest — it explores your app like 10 different real users. Code snippet: In the above program, use an expressed hold for the “ Get Started free ” push which is present in the BrowserStack home page. In Selenium, JavaScriptExecutor is utilize to scroll the page and make the web element visible within the viewport of the web page. Some webpages are long and active in nature and as it is scrolled, it shows data to the exploiter. In such scenarios, if you are test to interact with a web element which is not in view yet, Selenium throws ElementNotInteractableException. By employ JavaScript, you can scroll till the required web element and make it accessible for actionable activities such as clicking, typing, etc. You can use the executeScript method of JavaScriptExecutor class to scroll to the constituent like below. Input elements such as checkboxes, radio buttons and dropdowns are disabled in a web page in some circumstance. Disabled means it is not enabled and any action perform by Selenium on such constituent will throw an elision. In the above HTML codification, “maths” checkbox is disabled on the web page, whereas the “physics” checkbox is enabled. To avoid exception in such scenarios, chit for the constituent ’ s province and then try to execute the activeness on it, like below: In some scenario, the web component to be interact with is halt or overlapped by some other elements on the web page. The element such as average duologue or pop-ups which are blocking the desired web ingredient should be moved or dismissed from the view. Dismissing such overlapping component is necessary to interact with the desired web element. It is also potential that the element to be interacted with is present in the modal duologue box or alert box. In such cases, switch to the desired web component and then perform the operation. If the element to be interact with is inside a frame, you ask to exchange to that frame employ switch method as follows: Use the appropriate method to trade to the desired frame and the web component. Also guarantee that before switching to the shape, it is completely loaded. This article discussed what is ElementNotInteractableException, how it is surfaced and how you can avoid this exception by implementing diverse strategies. Even after employ these handling techniques, such issues may still seem inconsistently across different browsers and environments. That ’ s because element profile, timing, and interaction behavior can diverge based on how a browser render and executes the page. This makes testing on real device and browsers essential to get and resolve such exceptions reliably. Testing on can be cost efficient, nevertheless, it is crucial to screen the web covering on real devices as testing on simulators and imitator can not represent real-world scenarios such as network conditions, hardware configurations and environmental factors. Read More: Testing on real devices and browser is beneficial as it offers: Different devices and browser render web pages otherwise. To ensure that a yield application behaves uniformly across different pools of device and browsers, it is advisable to test it in the real device and browser with a real surround set up. Testing in and browsers ensures high-quality user experience, compatibility across different program, and validates performance and security of the coating in. BrowserStack is one such platform which leverages testing any mobile or web application by providing 3500+ real devices. Below are some of the features provided by BrowserStack ’ s Automate ware: ElementNotInteractableException is a common challenge in Selenium mechanization, often caused by timing topic, hidden or disabled elements, overlapping UI factor, or incorrect frame handling. Understanding the root causes of this exception is the 1st measure toward build more stable and reliable tests. By applying the right strategies, such as waiting for elements to become visible, scroll them into view, handling sheathing, and switching to the correct frame, you can importantly reduce the occurrence of this exception. Pairing these best drill with testing on real browsers and devices use BrowserStack Automate further helps uncover environment-specific interaction issues betimes, ensuring your Selenium tests behave systematically in real-world scenario. ElementNotInteractableException occurs when an element exists but can not be interacted with, while ElementNotVisibleException (deprecated) was thrown when an element was present but not visible. Modern Selenium uses ElementNotInteractableException to cover both cases. Yes. Using explicit waits to ensure an element is seeable and clickable before interaction is one of the most effective ways to prevent this exception, peculiarly for dynamically loaded content. BrowserStack Automate extend Selenium tests on existent browsers and devices while capturing screenshots, videos, and logs, making it easier to identify why an element wasn ’ t interactable in a specific environment. # Ask-and-Contributeabout this subject with our Discord community. Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed. Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.Element Not Interactable Exception in Selenium [2026]
Overview
What is an ElementNotInteractable Exception?
Facing Element Not Interactable errors?
When does an ElementNotInteractable Exception occur?
How to cover ElementNotInteractable Exception in Selenium
1. Wait for the element to be visible
public class ElementNotInteractableException {@ Test public void verifyPageTitle () {// Initialize ChromeDriver WebDriver driver = new ChromeDriver (); // Open the webpage driver.get (`` https: //www.browserstack.com/ ''); // Initialize WebDriverWait with a timeout of 10 s WebDriverWait wait = new WebDriverWait (driver, Duration.ofSeconds (10)); // Find the element which may not be initially interactable WebElement component = wait.until (ExpectedConditions.elementToBeClickable (By.id (`` signupModalProductButton ''))); // Perform action on the element element.click (); driver.manage () .timeouts () .implicitlyWait (Duration.ofSeconds (2)); Assert.assertEquals (driver.getCurrentUrl (), `` https: //www.browserstack.com/users/sign_up ''); // Close the browser driver.quit ();}}2. Scroll into the View
WebElement element = driver.findElement (By.id (`` signupModalProductButton '')); // Scroll element into view using JavaScriptExecutor ((JavascriptExecutor) driver) .executeScript (`` arguments [0] .scrollIntoView (true); '', element);
3. Enable the web element
& lt; input type = '' checkbox '' name = '' maths '' value = '' on '' disabled & gt; '' Maths '' & lt; input type = '' checkbox '' name = '' physics '' value = '' on '' & gt; '' Physics ''
WebElement element = driver.findElement (By.LocatorType (`` Locator value ''));if(element.isEnabled ()) {// If the element is enabled, perform craved actions element.click ();}else{// If the element is disabled, handle the situation accordingly System.out.println (`` Element is handicap. ``);}4. Handle overlapping ingredient
WebElement modalDialogBox = driver.findElement (By.id(`` modalDialogId ''));if(modalDialogBox.isDisplayed ()) {// Close the modal dialog driver.findElement (By.id(`` modalButtonCloseBtn '')) .click ();}5. Handle swap to correct frame
driver.switchTo () .frame (frameIndex); driver.switchTo () .frame (frameId); driver.switchTo () .frame (frameName);
Why is Testing on Real Devices and Browsers important?
Facing Element Not Interactable error?
Why use BrowserStack Automate for Selenium Tests?
Conclusion
FAQs
Related Guides
Automate This With SUSA
Test Your App Autonomously