There was an error while loading. Please reload this page.
2 parents 6d25d8d + 47991a7 commit c95d29cCopy full SHA for c95d29c
src/Selenium2Library/keywords/_screenshot.py
@@ -24,7 +24,11 @@ def capture_page_screenshot(self, filename=None):
24
background leaking when the page layout is somehow broken.
25
"""
26
path, link = self._get_screenshot_paths(filename)
27
- self._current_browser().save_screenshot(path)
+
28
+ if hasattr(self._current_browser(), 'get_screenshot_as_file'):
29
+ self._current_browser().get_screenshot_as_file(path)
30
+ else:
31
+ self._current_browser().save_screenshot(path)
32
33
# Image is shown on its own row and thus prev row is closed on purpose
34
self._html('</td></tr><tr><td colspan="3"><a href="%s">'
0 commit comments