1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Swallow JS error when attempting to get page source with selenium driver

This commit is contained in:
Thomas Walpole 2020-05-23 11:28:24 -07:00
parent edb5e88e7a
commit e7e42401c1

View file

@ -85,6 +85,10 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
def html
browser.page_source
rescue Selenium::WebDriver::Error::JavascriptError => e
return '' if e.match?(/documentElement is null/)
raise
end
def title