How to initialize winium in ruby?

260 views Asked by At

I am trying to automate desktop application using winium. I am not sure how to initialize the object of winium driver and where to place the driver.

1

There are 1 answers

0
Mo H. On

From: 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