Metadata-Version: 2.1
Name: robotframework-puppeteer-percy
Version: 0.1.0
Summary: Puppeteer Percy Library is a puppeteer percy client library for robot framework
Home-page: https://github.com/qahive/robotframework-puppeteer-percy
Author: QA Hive Co.,Ltd
Author-email: support@qahive.com
License: Apache License 2.0
Keywords: robotframework puppeteer percy web-testing automation
Platform: any
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Testing :: Acceptance
Classifier: Framework :: Robot Framework
Description-Content-Type: text/markdown
Requires-Dist: robotframework (>=3.2.1)
Requires-Dist: pyppeteer (>=0.2.2)
Requires-Dist: requests (>=2)

# Robotframework-Puppeteer-Percy
[Percy](https://percy.io) visual testing for [Robot Framework Puppeteer](https://github.com/qahive/robotframework-puppeteer).


Keyword documentation
---------------------
See [`keyword documentation`](https://qahive.github.io/robotframework-puppeteer-percy/PuppeteerPercyLibrary.html) for available keywords and more information about the library in general.


Installation
------------
The recommended installation method is using pip:

    pip install --upgrade robotframework-puppeteer-percylibrary

Or manually install by running following command

    pip install -r requirements.txt
    python setup.py install


Usage
------------
Create file name quick-start.robot with following content:

    *** Settings ***
    Library    PuppeteerLibrary
    Library    PuppeteerPercy
    Test Teardown    Close Browser


    *** Test Cases ***
    Capture home page screenshot
        ${HEADLESS}     Get variable value    ${HEADLESS}    ${False}
        &{options} =    create dictionary   headless=${HEADLESS}
        Open browser    http://example.com  options=${options}
        Maximize Browser Window
        Percy Snapshot    Home page

Need to run robot script with following command:

    npx percy exec -- robot quick-start.robot

Limitation
------------
- Not support for web site that restriction for other site resource files. 

FAQ
------------
- Snapshot throw error `ElementHandleError: Evaluation failed: Event`. Your web site not allow to inject 3rd party javascript. Need to ask developer to allow localhost javascript tobe executed.

Development
------------
Generate update keyword documents 

    python -m robot.libdoc -f html PuppeteerPercy docs/PuppeteerPercy.html


