Writing your first test script for the Edge browser

Let's set up the Microsoft WebDriver Server and create a test for testing the search feature on Microsoft Edge. We need to download and install Microsoft WebDriver Server on Windows 10 (https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/):

public class SearchTest {    WebDriver driver;    @BeforeMethod    public void setup() {        System.setProperty("webdriver.edge.driver",                "./src/test/resources/drivers/MicrosoftWebDriver.exe");        EdgeOptions options = new EdgeOptions();        options.setPageLoadStrategy("eager");                driver = new EdgeDriver(options);                driver.get("http://demo-store.seleniumacademy.com/");    }    @Test    public void searchProduct() {        // find search box and enter search string        WebElement ...

Get Selenium WebDriver 3 Practical Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.