Самый простой способ сделать это - использовать RemoteWebDriver
, который требует, чтобы сервер Selenium был запущен. Код будет выглядеть примерно так ( Предупреждение: непроверенный код).
// Assumes the Selenium server is running on port 4444 on localhost.
// Note that the Opera() method of the DesiredCapabilities class is
// not included in 2.0rc2 (the currently available binary release),
// but does exist in the trunk.
IWebDriver driver = new RemoteWebDriver("http://localhost:4444/wd/hub", DesiredCapabilities.Opera());