Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll Scroll
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView scrollIntoView
package com.javascript.example; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.testng.annotations.Test; import utility.Helper; public class ScrollDemo { @Test public void scrolling() throws Exception{ WebDriver driver = Helper.launchBrowser("chrome"); driver.get("http://anish-selenium.blogspot.in/p/scrollintoview-using-javascriptexecutor.html"); JavascriptExecutor js =((JavascriptExecutor)driver); js.executeScript("window.scrollBy(0, 200)"); WebElement element = driver.findElement(By.id("b1")); js.executeScript("arguments[0].scrollIntoView(true)", element); element = driver.findElement(By.id("input1")); js.executeScript("arguments[0].scrollIntoView(true)", element); js.executeScript("alert('Hi, How are you!!')"); Thread.sleep(5000); driver.switchTo().alert().accept(); js.executeScript("alert(new Date())"); Thread.sleep(5000); driver.switchTo().alert().accept(); js.executeScript("var d = new Date(); var text = d.toLocaleDateString(); alert(text);"); Thread.sleep(5000); driver.switchTo().alert().accept(); } }
No comments:
Post a Comment