I am using the below code-
WebElement ele= driver.findElement(By.xpath("//span[text()='Select Selection Field 3']"));
((JavascriptExecutor)driver).executeScript("arguments[0].scrollIntoView(true);", ele);
And it doesn't perform any function. I dont get any error but scrolling is becoming a blocker for me. Please Help!!
Before you attempt to scrollIntoView() you need to induce WebDriverWait for the visibilityOfElementLocated() as follows:
In a single line: