Puppeteer Percy Library is a puppeteer percy client library for robot framework
Project description
Robotframework-Puppeteer-Percy
Percy visual testing for Robot Framework Puppeteer.
Keyword documentation
See keyword documentation
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 and register new account
(2) Create new project and save the PERCY_TOKEN
(3) Run export token
- Window:
set PERCY_TOKEN=<your percy token>
- Linux:
export PERCY_TOKEN=<your 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 documents
python -m robot.libdoc -f html PuppeteerPercy docs/PuppeteerPercy.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for robotframework-puppeteer-percy-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 725d9077a2b69c8abe668b131dbf52ae2cc16580d0bbc11b756d97b868ecd642 |
|
MD5 | d5665a3b8fdd03e4185067f443645e82 |
|
BLAKE2b-256 | b4bbc9c1fa24cf5aa8293b5455cbd5c8a8dc5e8e24a7e3612bfd8838b5771f43 |
Hashes for robotframework_puppeteer_percy-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 720acfc3684da5337d600d08a85cb74f9e8045e294af1256e1ecad577dee1b20 |
|
MD5 | 8775eb0af595fa537b5ac1c327a2d031 |
|
BLAKE2b-256 | ece7fa9f0b18fbf71c89329ff59ff5991be662cad17ea3881ee5b7fdbe648efe |