Created
March 10, 2011 11:50
-
-
Save andreastt/863985 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'operawatir/helper' | |
require 'clipboard' | |
describe 'Opera' do | |
describe 'Clipboard' do | |
before :each do | |
browser.url = 'http://t/test.html' | |
window.p(:id, 'test').double_click | |
end | |
platform_dependent_on :windows, :linux do | |
it 'copies marked text to clipboard on Windows and Linux' do | |
browser.keys.send [:Control, 'C'] | |
Clipboard.paste.should include 'foobar' | |
end | |
end | |
platform_dependent_on :macosx do | |
it 'copies marked text to clipboard on OS X' do | |
browser.keys.send [:Command, 'C'] | |
Clipboard.paste.should include 'foobar' | |
end | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment