-
Notifications
You must be signed in to change notification settings - Fork 252
Open
Labels
Description
I'm submitting a ...
- bug report
- feature request
- support request => Please do not submit support request here, see note at the top of this template.
This could be an good example or part of a robot adapter
import allure
from SeleniumLibrary import ScreenshotKeywords
from SeleniumLibrary.base import keyword, LibraryComponent
class AllureSeleniumPlugin(LibraryComponent):
@keyword
def capture_page_screenshot(self, filename='selenium-screenshot-{index}.png'):
path = ScreenshotKeywords(ctx=self.ctx).capture_page_screenshot(filename)
allure.attach.file(path, attachment_type=allure.attachment_type.PNG)
Library SeleniumLibrary plugins=AllureSeleniumPlugin