我使用硒webdriver和紅寶石。長話短說我正在研究一個Web應用程序,點擊一個按鈕將文本字段中的所有數據複製到剪貼板。我想訪問這些數據,並比較一個字符串是否存在。如何訪問剪貼板數據以實現自動化?
我已經安裝了剪貼板和Win32 /剪貼板gems.Here是我的代碼
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