我正在使用 selenium webdriver 和 ruby。长话短说,我正在开发一个 Web 应用程序,单击按钮即可将文本字段中的所有数据复制到剪贴板。我想访问该数据并比较是否存在字符串。
我已经安装了剪贴板和 win32/剪贴板 gems。这是我的代码
include Win32
abc = Clipboard.data
em = " ooyalaPlayer = OO.Player.create('playerContainer',"
puts 'true' if abc.include? em
这是错误堆栈
$ jruby tests/embed_add_remove_playlist.rb -b firefox -a staging
ui-test-support will place screenshots and additional logs under:
results_dir=E:/testing/behavioral_tests/themebuilder/results
c:/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:36: Use RbConfig inste
ad of obsolete and deprecated Config.
LoadError: no such file to load -- win32-clipboard
require at org/jruby/RubyKernel.java:1054
require at c:/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at E:/testing/behavioral_tests/themebuilder/lib/embed_helper.rb:8
require at org/jruby/RubyKernel.java:1054
require at c:/jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at tests/embed_add_remove_playlist.rb:8