PP
Size: a a a
PP
PP
PP
cm
PP
PP
PP
PP
TT
TT
AS
A
After do |scenario|
if scenario.failed?
timestamp = "#{Time.now.strftime('%Y-%m-%d-%H%M%S')}"
screenshot_name = "screenshot-#{scenario.name}-#{timestamp}.png"
screenshot_path = "results2/#{screenshot_name}"
Capybara.page.save_screenshot(screenshot_path)
end
end
A
SK
A
After do |scenario|
if scenario.failed?
timestamp = "#{Time.now.strftime('%Y-%m-%d-%H%M%S')}"
screenshot_name = "screenshot-#{scenario.name}-#{timestamp}"
screenshot_path = "results2/#{screenshot_name}.png"
Capybara.page.save_screenshot(screenshot_path)
Allure.add_attachment(
name: screenshot_name,
source: File.open("results2/#{screenshot_name}.png"),
type: Allure::ContentType::PNG,
test_case: false
)
end
end
A
PP
PP
DB
DR