Controlling Opera Driver from within .NET
How can I control Opera Driver https://github.com/operasoftware/operadriver/ (or even Opera the browser itself) on Windows from within the .NET framework?
My goal is to make something similar to Browsershots开发者_如何学JAVA.org
The easiest way to do this would be to use the RemoteWebDriver
, which requires the Selenium server to be running. The code would look something like the following (Warning: untested code).
// 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());
精彩评论