Skip to content

Instantly share code, notes, and snippets.

@smartinm
Created October 26, 2015 11:40
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smartinm/4c26c46fadad54b700b7 to your computer and use it in GitHub Desktop.
Save smartinm/4c26c46fadad54b700b7 to your computer and use it in GitHub Desktop.
How to print HTML of elements in Capybara
element = page.find("div.example")
p element.native.attribute('outerHTML')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment