- Open the https://github.com/TrainingByPackt/BeginningSelenium/blob/master/docs/lesson_9/lesson9/src/test/java/com/ beginningselenium/examples/scripts/AgeCalculatorTestLocal.java file containing the automation script for the Age Calculator application.
- Declare the browser we want to use in the test, for that we can use the DesiredCapabilities object in the following way:
DesiredCapabilities desiredCapabilities = new DesiredCapabilities(new ChromeOptions());
- Change the line where we created the WebDriver from:
driver = new ChromeDriver();
to
driver = new RemoteWebDriver(new URL("http://localhost:4444/ wd/hub"), desiredCapabilities);
- Compile and run the test.