require 'selenium-webdriver'
capabilities =
{
'app' => 'H:/NotesList.apk',
'browserName' => 'Android',
'platform' => 'windows',
'version' => '4.2',
'app-activity'=> '.NotesList',
'app-package'=> 'com.example.android.notepad'
}
#pp capabilities.merge(dala)
server_url = 'http://127.0.0.1:4723/wd/hub'
puts "wxs"
dr = Selenium::WebDriver.for(:remote,:desired_capabilities =>capabilities,:url =>server_url)
dr.manage.timeout.implicit_wait =20 #seconds
puts "dddd"
这是 ruby 代码,简单的