Skip to content

Instantly share code, notes, and snippets.

@ckenst
Created November 29, 2017 22:20
Show Gist options
  • Save ckenst/6d58125f9ea801bf8638ebcc3cbba435 to your computer and use it in GitHub Desktop.
Save ckenst/6d58125f9ea801bf8638ebcc3cbba435 to your computer and use it in GitHub Desktop.
Print browser console inlcuding JavaScript errors
def run
setup
yield
teardown
end
run do
@driver.get 'http://www.kenst.com/about'
expect(@driver.title).to eql "About – Chris Kenst's Blog"
# This will print all of the console logs for your browser including javascript errors
puts @driver.manage().logs().get('browser')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment