Copy-paste using Capybara?
问题 I would love to do something like this: div = find '#some-div' copy_to_clipboard(div) input = find '#my-input' paste_from_clipboard(input) I do not want to simulate this with send_keys and using Ctrl+C and Ctrl+V; I want this to work cross-browser (especially on mobile). Does this API exist? 回答1: There is no Capybara copy/paste API - If all you want to do is copy the visible text into an input then you could do div_text = find('#some-div').text() find('#my-input').set(div_text) If that's not