我想知道watirgrid/gridinit是否可以和Sikuli一起使用。 http://www.sikuli.orgwatirgrid和sikuli - 他們可以一起玩嗎?
我已經有一些成功整合Sikuli用的Watir-的webdriver和黃瓜繼例子
這一切都正在從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的應用。
我要編輯此爲清楚起見,但我現在意識到我真的不能跟着你想在您的文章的細節說什麼。我能否建議您重新格式化以顯示您已經經歷了更清晰的過程?它需要很容易遵循你的思路。這樣可以防止降低投票並讓您更加關注可能的答覆者。 – kinofrost 2011-06-17 15:26:35