Skip to main content

PuppeteerLibrary is a Web Testing library for Robot Framework.

Project description

Functional Test Gitpod ready-to-code

robotframework-puppeteer

Robot Framework Puppeteer Library powered by Pyppeteer. Improve automated web testing with chrome native functionality from Puppeteer by Google and webkit from Playwright.

More detail please visit Robot Framework Puppeteer Homepage

We aim to provide keywords similar to robotframework-seleniumlibrary and add core puppeteer functionality that will improve test experiences. Example:

  • Handle HTTP Request
  • Handle HTTP Response
  • Intercepter Http
  • Intercepter javascript function

Browser Support

Browser Support Library
Chromium Puppeteer & Playwright
WebKit Playwright
Firefox Playwright

Keyword documentation

See keyword documentation for available keywords and more information about the library in general.

Installation

Please ensure you have Python version >= 3.7 installed.

The recommended installation method is using pip_::

pip install --upgrade robotframework-puppeteerlibrary
python -m playwright install
pyppeteer-install

Or manually install by running following command

pip install -r requirements.txt
python setup.py install
python -m playwright install
pyppeteer-install

Usage

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


*** Test Cases ***
Example login form submit
    ${HEADLESS}     Get variable value    ${HEADLESS}    ${False}
    &{options} =    create dictionary   headless=${HEADLESS}
    Open browser    http://127.0.0.1:7272   options=${options}
    Input text    id:username_field    demo
    Input text    id:password_field    mode
    Click Element    id:login_button
    Wait Until Page Contains    Login succeeded
    # Logout and wait for homepage loaded
    Run Async Keywords
    ...    Click Link    partial link:logout    AND
    ...    Wait For Response Url    http://127.0.0.1:7272/

Please run demo application on your local before execute example test scripts.

Starting demo application

Running tests requires the demo application located under demoapp directory to be running. It can be started either by double clicking demoapp/server.py file in a file manager or by executing it from the command line:

python demoapp/server.py

Full example please recheck Examples

Extended Puppeteer Libraries

Library Description
Percy.io Visual testing library for Robot Framework Puppeteer.

Contributor

robotframework-puppeteer mainly contribute by QAHive Co. Ltd.

Interested to contribute Cool!! please looking at the Contribution guidelines

Credit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

robotframework-PuppeteerLibrary-3.1.3.tar.gz (67.1 kB view hashes)

Uploaded Source

Built Distributions

robotframework_PuppeteerLibrary-3.1.3-py3.10.egg (191.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page