I am facing this problem on Firefox v.59, Selenium 3.11.0. I just click on an element, like this:


and I get exception:

org.openqa.selenium.ElementNotInteractableException: Element <tr id="row_0" class="row_0 txtSearchColor1"> could not be scrolled into view

I already try with JavascriptExecutor like this:

js.executeScript("arguments[0].scrollIntoView(true);", webDriver.findElement(By.id("row_0")));
js.executeScript("arguments[0].click();", webDriver.findElement(By.id("row_0")));

but nothing works, it does nothing. This is element HTML:

<tr id="row_0" class="row_0 txtSearchColor1">

Note that, all the solutions work normally on Chrome (v65) and this element is visible. Does anyone have the same problem and a solution? Thanks

EDIT: HTML code of the elements: enter image description here

  • 1
    Does it work on Firefox<59? Mar 24 '18 at 8:31
  • What happens when you do? "scrollIntoView(false);" Mar 26 '18 at 20:35
  • @VishalAggarwal Hi, I already tried it js.executeScript("arguments[0].scrollIntoView(false);", element); , but it did nothing, it just bypassed the block, no exception. As you can see my discussion below, I tried with both whole row (throw exception) or one column (just bypassed), but nothing worked
    – Ragnarsson
    Mar 27 '18 at 7:51

A workaround that works for me so far is that I use a 'fake' tr:

  • Find the tr I want to click
  • Find a td that belongs to that tr and click on it. it works

This bug is reported on Bugzilla and this workaround is recommended

  • 1
    I am quite new to this and facing same issue for almost all my cases. I am not sure exactly what is mean by 'tr' and 'td' in workaround mentioned. 1. Find the 'tr' I want to click 2. Find a 'td' that belongs to that 'tr' and click on it, it would works. Jan 30 '20 at 3:30
  • @Ragnarsson Ashwini attempted to comment on here but did not have the reputation, so I converted their answer to a comment here.
    – corsiKa
    Feb 1 '20 at 17:09

I faced the same issue when I upgraded to new Firefox version 63. I have used the Actions class to click an element. Give a try!

WebElement  element = WebDriver.findElement("locator");               
Actions act=new Actions(driver);

Wait for sometime before clicking.Give the page some time to load/scroll to the element.

  • I tried everything: Thread.sleep() or explicit and implicit Wait or waitForPageLoad() with "return document.readyState" or I debugged it, and let it wait until everything stable before I moved to next line to click, but I still get the same error on Firefox
    – Ragnarsson
    Mar 26 '18 at 8:49

I also use a javascript to scroll an element into view, but I use the x and y positions, and I also wait for jquery to be active:

public static void scrollIntoView(WebElement ele) {
    ((JavascriptExecutor)driver).executeScript("window.scrollTo(" + ele.getLocation().x + "," + ele.getLocation().y + ")");

public static void waitForJQueryToBeActive() {
    Boolean isJqueryUsed = (Boolean) ((JavascriptExecutor) driver)
            .executeScript("return (typeof(jQuery) != 'undefined')");
    if (isJqueryUsed) {
        while (true) {
            // JavaScript test to verify jQuery is active or not
            Boolean ajaxIsComplete = (Boolean) (((JavascriptExecutor) driver)
                    .executeScript("return jQuery.active == 0"));
            if (ajaxIsComplete)
            try {
            } catch (InterruptedException e) {
  • Thanks for your answer. I tried it, but unfortunately, it doesn't work too, it passes these lines and does nothing, like all my solutions. Of course, it works for Chrome, only Firefox doesn't.
    – Ragnarsson
    Mar 26 '18 at 15:10
  • Does it attempt to scroll, at least, or does it just immediately fail? Perhaps you could try scrolling to another element that's at or below the desired one, then attempt to access the one you want? Mar 26 '18 at 15:19
  • 1
    It doesn't attempt to scroll, it just rans through the block. I also tried your suggestion to findElements which has this one in the group, and I tried to click on it, and I get exactly error like others, "Element could not be scrolled into view" :(
    – Ragnarsson
    Mar 26 '18 at 15:40
  • Can you share in your original post at least a segment of the HTML. I wonder if there might be an invisible blocker element of some kind, or perhaps is the element in an iframe? Mar 26 '18 at 15:44
  • I don't think it is in a iframe, just table inside table. I updated my post. I tried to click all the ids around it, but nothing works.
    – Ragnarsson
    Mar 26 '18 at 15:57

I was getting the same issue but below JavascriptExecutor works for me on Firefox

Please find the below code driver.get("https://www.icicibank.com/"); System.out.println(driver.getWindowHandle()); driver.manage().timeouts().implicitlyWait(50,TimeUnit.SECONDS); Setwind=driver.getWindowHandles(); for (String hand : wind) { driver.switchTo().window(hand); System.out.println("Window "+hand); } JavascriptExecutor js = (JavascriptExecutor) driver; //js.executeScript("document.querySelector("button[id=yourButton]").click()"); WebElement element = driver.findElement(By.xpath("//div[@id='push-modal-content' and @class='active']/div[@id='push-modal-close' and contains(text(),'Later')]")); js.executeScript("arguments[0].scrollIntoView();",element); try { Thread.sleep(10000); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } js.executeScript("arguments[0].click();",element);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.