Selenium 远程执行和监听类
public class BrowserChromeImpl implements BrowserDriver { @Override public WebDriver getDriver() { SeleniumListener seleniumListener = new SeleniumListener(); return new EventFiringWebDriver(new ChromeDriver()).register(seleniumListener); } @Override public WebDriver getDriver(URL url) { SeleniumListener seleniumListener = new SeleniumListener(); DesiredCapabilities capabilities = DesiredCapabilities.chrome(); return new EventFiringWebDriver(new RemoteWebDriver(url,capabilities)).register(seleniumListener); } }