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":
@BeforeMethodpublic 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 ...