Skip to content

Commit 8e45d35

Browse files
committed
give me the screenshots and page source, even
1 parent f5f7521 commit 8e45d35

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

rb/spec/integration/selenium/webdriver/spec_helper.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,12 @@
6464
end
6565

6666
c.after do |example|
67-
result = example.execution_result
68-
reset_driver! if example.exception || result.pending_exception
67+
if example.exception && WebDriver.logger.debug?
68+
driver.save_screenshot("bazel-logs/#{driver.session_id}.png")
69+
WebDriver.logger.info("Page Source: #{driver.page_source}")
70+
end
71+
72+
reset_driver! if example.exception || example.execution_result.pending_exception
6973
end
7074
end
7175

0 commit comments

Comments
 (0)