【问题标题】:Controlling Opera Driver from within .NET从 .NET 中控制 Opera 驱动程序
【发布时间】:2011-09-11 01:44:03
【问题描述】:

如何在 .NET 框架内控制 Windows 上的 Opera Driver https://github.com/operasoftware/operadriver/(甚至是 Opera 浏览器本身)?

我的目标是制作类似于 Browsershots.org 的东西

【问题讨论】:

    标签: c# .net opera webdriver


    【解决方案1】:

    最简单的方法是使用 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());
    

    【讨论】:

      猜你喜欢
      • 2014-09-03
      • 1970-01-01
      • 2012-09-20
      • 2011-03-21
      • 1970-01-01
      • 1970-01-01
      • 2010-09-25
      • 2020-11-04
      • 1970-01-01
      相关资源
      最近更新 更多