Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qahive/robotframework-puppeteer-percy
Percy visual testing for Robot Framework Puppeteer.
https://github.com/qahive/robotframework-puppeteer-percy
Last synced: about 1 month ago
JSON representation
Percy visual testing for Robot Framework Puppeteer.
- Host: GitHub
- URL: https://github.com/qahive/robotframework-puppeteer-percy
- Owner: qahive
- License: apache-2.0
- Created: 2020-07-16T04:56:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-12T05:05:54.000Z (almost 4 years ago)
- Last Synced: 2024-09-29T19:20:24.549Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 99.6 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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/PuppeteerPercy.html) for available keywords and more information about the library in general.Require [robotframework-puppeteer]](https://github.com/qahive/robotframework-puppeteer) version 2 or above.
Installation
------------
The recommended installation method is using pip:pip install --upgrade robotframework-puppeteer-percy
Or manually install by running following command
pip install -r requirements.txt
python setup.py install
Usage
------------
(1) Go to [percy.io](https://percy.io/) and register new account(2) Create new project and save the PERCY_TOKEN
(3) Run export token
- Window: `set PERCY_TOKEN=`
- Linux: `export PERCY_TOKEN=`
(4) 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(5) Run robot script with following command:
npx percy exec -- robot quick-start.robot
`npx percy exec` will start percy agent and auto stop when test completed
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 documentspython -m robot.libdoc -f html PuppeteerPercy docs/PuppeteerPercy.html