Skip to content

Latest commit

 

History

History
102 lines (72 loc) · 3.94 KB

README.md

File metadata and controls

102 lines (72 loc) · 3.94 KB

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