lib/selenium/webdriver/common/takes_screenshot.rb in selenium-webdriver-4.7.1 vs lib/selenium/webdriver/common/takes_screenshot.rb in selenium-webdriver-4.8.0
- old
+ new
@@ -30,12 +30,12 @@
#
def save_screenshot(png_path, full_page: false)
extension = File.extname(png_path).downcase
if extension != '.png'
- WebDriver.logger.warn "name used for saved screenshot does not match file type. " \
- "It should end with .png extension",
+ WebDriver.logger.warn 'name used for saved screenshot does not match file type. ' \
+ 'It should end with .png extension',
id: :screenshot
end
File.open(png_path, 'wb') { |f| f << screenshot_as(:png, full_page: full_page) }
end
@@ -58,9 +58,8 @@
raise Error::UnsupportedOperationError, "unsupported format: #{format.inspect}"
end
rescue NameError
raise Error::UnsupportedOperationError, "Full Page Screenshots are not supported for #{inspect}"
end
-
end # TakesScreenshot
end # WebDriver
end # Selenium