Using RemoteWebDriver for Internet Explorer

For executing tests on the Internet Explorer driver, the steps are similar to what we did with the Chrome and Firefox browsers. 

Let's see this by changing the test script that we used for the Chrome or Firefox browser to the following script, using "internet explorer":

@BeforeMethod
public void setup() throws MalformedURLException {

DesiredCapabilities caps = new DesiredCapabilities();
caps.setBrowserName("internet explorer");

driver = new RemoteWebDriver(new URL("http://127.0.0.1:4444/wd/hub"), caps);
driver.get("http://demo-store.seleniumacademy.com/");

}

Before you try to execute this code, restart Selenium Standalone Server to use InternetExplorerDriver:

java -jar -Dwebdriver.ie.driver=InternetExplorerDriver.exe selenium-server-standalone-3.12.0.jar

Try executing the preceding test script now, and you should see the Internet Explorer browser getting launched and executing your test commands. Selenium Standalone Server has started InternetExplorerDriver, created a connection with it, and started executing the test-script commands.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.87.95