org.openqa.selenium.ElementNotInteractableException: Element could not be scrolled into view when trying to click a button

前端 未结 3 1056
离开以前
离开以前 2020-11-28 16:55

I\'m working with gecko driver selenium java with FF 60.0. Previously my code was working properly, but all of sudden, now every time I run it, it gives me an error as

3条回答
  •  北海茫月
    2020-11-28 17:24

    You can simply try following js to scroll the page.Enter Pixel asper your requirement to scroll page. Here I use 3000 Px to scroll page to mid

       JavascriptExecutor js = (JavascriptExecutor) driver;
        js.executeScript("window.scrollBy(0,3000)");

提交回复
热议问题