0

我正在尝试使用 winium 自动化桌面应用程序。我不确定如何初始化winium驱动程序的对象以及放置驱动程序的位置。

4

1 回答 1

0

来自:https ://github.com/2gis/Winium.Desktop/issues/165#issuecomment-296646996

require 'selenium-webdriver'
require 'rubygems'
class WiniumTest
  def launchApplication
    caps = Selenium::WebDriver::Remote::Capabilities.new
    caps['app'] = 'C:/windows/system32/calc.exe'
    driver = Selenium::WebDriver.for :remote, url: "http://localhost:9999", desired_capabilities: caps
  end
end

Test = WiniumTest.new
Test.launchApplication
于 2018-11-16T20:54:46.193 回答