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 で使用可能な screen メソッドを取得する方法は? ++++++++++++++
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)'
vnc ベースのアプリケーションのパフォーマンス テストに watigrid と sikuli を使用することに関心があります。