public void scrollToElemet(WebElement element) {
executeScript("window.scrollTo(arguments[0],arguments[1])", element.getLocation().x, element.getLocation().y);
}
public void scrollToElemetAndClick(WebElement element) {
scrollToElemet(element);
element.click();
}
public void scrollIntoView(WebElement element) {
executeScript("arguments[0].scrollIntoView()", element);
}
public void scrollIntoViewAndClick(WebElement element) {
scrollIntoView(element);
element.click();
}
public void scrollDownVertically() {
executeScript("window.scrollTo(0, document.body.scrollHeight)");
}
public void scrollUpVertically() {
executeScript("window.scrollTo(0, -document.body.scrollHeight)");
}
public void scrollDownByPixel() {
executeScript("window.scrollBy(0,1500)");
}
public void scrollUpByPixel() {
executeScript("window.scrollBy(0,-1500)");
}
public void ZoomInBypercentage() {
executeScript("document.body.style.zoom='40%'");
}
public void ZoomBy100percentage() {
executeScript("document.body.style.zoom='100%'");
}
executeScript("window.scrollTo(arguments[0],arguments[1])", element.getLocation().x, element.getLocation().y);
}
public void scrollToElemetAndClick(WebElement element) {
scrollToElemet(element);
element.click();
}
public void scrollIntoView(WebElement element) {
executeScript("arguments[0].scrollIntoView()", element);
}
public void scrollIntoViewAndClick(WebElement element) {
scrollIntoView(element);
element.click();
}
public void scrollDownVertically() {
executeScript("window.scrollTo(0, document.body.scrollHeight)");
}
public void scrollUpVertically() {
executeScript("window.scrollTo(0, -document.body.scrollHeight)");
}
public void scrollDownByPixel() {
executeScript("window.scrollBy(0,1500)");
}
public void scrollUpByPixel() {
executeScript("window.scrollBy(0,-1500)");
}
public void ZoomInBypercentage() {
executeScript("document.body.style.zoom='40%'");
}
public void ZoomBy100percentage() {
executeScript("document.body.style.zoom='100%'");
}