package com.hogwarts.webui; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.RemoteWebDriver; import java.net.MalformedURLException; import java.net.URL; public class RemoteWebdriverTest { public static void main(String[] args) throws MalformedURLException { ChromeOptions cho = new ChromeOptions(); cho.setCapability("browserVersion","105.0"); cho.setCapability("browserName","chrome"); WebDriver remoteDriver = new RemoteWebDriver(new URL("http://43.143.55.10:5444/wd/hub"), cho); remoteDriver.get("www.baidu.com"); remoteDriver.quit(); } }