Skip to content

Instantly share code, notes, and snippets.

@twalpole
Created October 7, 2016 19:09
Show Gist options
  • Save twalpole/80c08b52fdc60326fafb93171d71d4c8 to your computer and use it in GitHub Desktop.
Save twalpole/80c08b52fdc60326fafb93171d71d4c8 to your computer and use it in GitHub Desktop.
test issue with capybara/selenium-webdriver/jruby
require "capybara"
html = DATA.read
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] }
sess = Capybara::Session.new(:selenium, app)
sess.visit("/")
#This throws the error
sess.first(:css, '.item').text
__END__
<!doctype html>
<html lang="en">
<body>
<div class="item">
My Item
</div>
<div class="item">
My Other Item
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment