Search in sources :

Example 1 with EdgeDriver

use of com.microsoft.edge.seleniumtools.EdgeDriver in project HYR-Tutorials by YadaGiriReddy.

the class TestBrowserMaximization method main.

public static void main(String[] args) throws Exception {
    // Way 1 - Chrome
    // WebDriverManager.chromedriver().setup();
    // WebDriver driver = new ChromeDriver();
    // driver.manage().window().maximize();
    // driver.get("https://www.google.com/");
    // Way 1 - Firefox
    // WebDriverManager.firefoxdriver().setup();
    // WebDriver driver = new FirefoxDriver();
    // driver.manage().window().maximize();
    // driver.get("https://www.google.com/");
    // Way 1 - Edge
    // WebDriverManager.edgedriver().setup();
    // WebDriver driver = new EdgeDriver();
    // driver.manage().window().maximize();
    // driver.get("https://www.google.com/");
    // Way 2 - Chrome
    // WebDriverManager.chromedriver().setup();
    // ChromeOptions options = new ChromeOptions();
    // options.addArguments("start-maximized");
    // WebDriver driver = new ChromeDriver(options);
    // driver.get("https://www.google.com/");
    // Way 2 - Edge
    WebDriverManager.edgedriver().setup();
    EdgeOptions options = new EdgeOptions();
    options.addArguments("start-maximized");
    WebDriver driver = new EdgeDriver(options);
    driver.get("https://www.google.com/");
}
Also used : WebDriver(org.openqa.selenium.WebDriver) EdgeOptions(com.microsoft.edge.seleniumtools.EdgeOptions) EdgeDriver(com.microsoft.edge.seleniumtools.EdgeDriver)

Aggregations

EdgeDriver (com.microsoft.edge.seleniumtools.EdgeDriver)1 EdgeOptions (com.microsoft.edge.seleniumtools.EdgeOptions)1 WebDriver (org.openqa.selenium.WebDriver)1