Created
November 29, 2017 22:20
-
-
Save ckenst/6d58125f9ea801bf8638ebcc3cbba435 to your computer and use it in GitHub Desktop.
Print browser console inlcuding JavaScript errors
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
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