1package org.openqa.selenium.ie;2import org.openqa.selenium.WebDriver;3import org.openqa.selenium.ie.InternetExplorerDriver;4import org.openqa.selenium.ie.InternetExplorerDriverService;5import org.openqa.selenium.remote.DesiredCapabilities;6import org.openqa.selenium.remote.RemoteWebDriver;7import java.io.File;8import java.io.IOException;9import java.net.MalformedURLException;10import java.net.URL;11public class InternetExplorerDriverServiceBuilder {12 public static void main(String[] args) throws IOException {13 InternetExplorerDriverService.Builder builder = new InternetExplorerDriverService.Builder();14 builder.usingDriverExecutable(new File("C:\\Program Files\\Internet Explorer\\iexplore.exe"));15 builder.usingAnyFreePort();16 builder.withLogFile(new File("C:\\Users\\User\\Desktop\\Selenium\\log.txt"));17 builder.withSilent(true);18 builder.withHost("localhost");19 builder.withLogLevel(InternetExplorerDriverLogLevel.TRACE);20 InternetExplorerDriverService service = builder.build();21 service.start();22 DesiredCapabilities capabilities = new DesiredCapabilities();23 capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);24 capabilities.setCapability(InternetExplorerDriver.IE_SWITCHES, "-private");25 capabilities.setCapability(InternetExplorerDriver.IGNORE_ZOOM_SETTING, true);26 capabilities.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);27 capabilities.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);28 capabilities.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, true);29 capabilities.setCapability(InternetExplorerDriver.UNEXPECTED_ALERT_BEHAVIOR, true);30 capabilities.setCapability(InternetExplorerDriver.ENABLE_ELEMENT_CACHE_CLEANUP, true);31 capabilities.setCapability(InternetExplorerDriver.BROWSER_ATTACH_TIMEOUT, 100);32 capabilities.setCapability(InternetExplorerDriver.LOG_FILE, "C:\\Users\\User\\Desktop\\Selenium\\log.txt");33 capabilities.setCapability(InternetExplorerDriver.LOG_LEVEL, InternetExplorerDriverLogLevel.TRACE);34 capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true);35 capabilities.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);36 capabilities.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING, true);37 capabilities.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);38 capabilities.setCapability(Int