我想知道 watirgrid / gridinit 是否可以与 Sikuli 一起使用。http://www.sikuli.org
按照中的示例,我已经成功地将 Sikuli 与 watir-webdriver 和 cucumber 集成在一起
这一切都由 Jruby 完成。
对我来说下一步是看看我是否可以使用 watirgrid 发送 sikuli 命令,但到目前为止我还没有成功。
我按照http://altentee.com/blogs/2010/watirgrid-support-for-watir-webdriver/中的示例进行操作
我输入的内容:
irb
require 'watirgrid'
require 'watir-webdriver'
require 'java'
java_import "org.sikuli.script.SikuliScript"
java_import "org.sikuli.script.Region"
java_import "org.sikuli.script.Screen"
# setup a controller on port 12351 for your new grid
controller = Controller.new(
:ring_server_port => 12351,
:loglevel => Logger::ERROR)
controller.start
# add a provider to your grid
# :browser_type => 'webdriver' if using webdriver or
# :browser_type => 'ie' if using watir...
provider = Provider.new(
:ring_server_port => 12351,
:loglevel => Logger::ERROR, :browser_type => 'webdriver')
provider.start
# connect to the grid and take all providers from it (this time only one)
grid = Watir::Grid.new(:ring_server_port => 12351, :ring_server_host => '192.168.0.107')
screen=Screen.new
grid.start(:take_all => true)
+++++++++++++++ 到目前为止一切都很好。++++++++++++++++
+++++++++++++这是轮子脱落的地方++++++++++++++
+++++++++++++++ 如何获得可用于 Watirgrid 的屏幕方法?++++++++++++++++
irb(main):029:0* grid.screen.click("StartUpAdobe\/f.png",0)
NoMethodError: undefined method `screen' for #<Watir::Grid:0x1a0283e>
from (irb):29:in `evaluate'
from org/jruby/RubyKernel.java:1088:in `eval'
from C:/jruby-1.6.2/lib/ruby/1.8/irb.rb:158:in `eval_input'
from C:/jruby-1.6.2/lib/ruby/1.8/irb.rb:271:in `signal_status'
from C:/jruby-1.6.2/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1419:in `loop'
from org/jruby/RubyKernel.java:1191:in `catch'
from C:/jruby-1.6.2/lib/ruby/1.8/irb.rb:154:in `eval_input'
from C:/jruby-1.6.2/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1191:in `catch'
from C:/jruby-1.6.2/lib/ruby/1.8/irb.rb:70:in `start'
from C:\jruby-1.6.2\bin\irb:13:in `(root)'
我们有兴趣使用 watigrid 和 sikuli 来测试基于 vnc 的应用程序的性能。