package JsExecutor;

import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class JsExecutor
{
    public static void main(String[] args) {
        WebDriver obj = new FirefoxDriver();

        obj.get("https://rahulshettyacademy.com/AutomationPractice/");

        // Creating JavaScript Executor Object.

        JavascriptExecutor js = (JavascriptExecutor) obj; // casting obj as javascript executor to store in js object.

        js.executeScript("window.scrollBy(0,700)");



    }
}
