'How to scroll down intro element view with selenium+javascript
Im just new in javascript. I used to work with selenium+java. Now I want to perform scroll using JavaScriptExecutor. How do I make it in javascript code instead of java?
js.executeScript("arguments[0].scrollIntoView();", Element);
Solution 1:[1]
//scroll down with Javascript first
WebDriverWait wait = new WebDriverWait(driver, 30);
WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("selector")));
//interact with your element
element.click()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Laurel |