Skip to content

allure plugin for robotframework-seleniumlibrary #476

@skhomuti

Description

@skhomuti

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions