Created
June 9, 2018 05:44
-
-
Save samnissen/730be7b78fb9f3b4e2080a0515f60690 to your computer and use it in GitHub Desktop.
Capture / display the console log output from a page load with Watir
This file contains 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
require 'watir' | |
b = Watir::Browser.new | |
b.goto "https://nytimes.com" | |
b.driver.manage.logs.get(:browser).each do |log| | |
puts log | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment