Skip to content

praegus/toolchain-playwright-fixture

Repository files navigation

Praegus_logo Praegus Toolchain Playwright Fixture

maven version

Publish package to the Maven Central Repository

A FitNesse fixture for writing browser tests using the Playwright Java API. Based on and inspired by the HSAC fixtures.

Only a subset of the available Playwright commands is currently implemented in this fixture.

This fixture requires Java 11 or newer

Getting started

  • Make sure the HSAC fixtures are present in your project
  • Add the fixture as Maven dependency to your FitNesse project.
<dependency>
    <groupId>nl.praegus</groupId>
    <artifactId>toolchain-playwright-fixture</artifactId>
    <version>1.8.1</version>
</dependency>
  • Add the fixture to the project imports. For example:
|Import                                      |
|nl.hsac.fitnesse.fixture                    |
|nl.hsac.fitnesse.fixture.slim               |
|nl.praegus.fitnesse.slim.fixtures.playwright|
  • To configure and start a browser, use the playwright setup fixture.
|script            |playwright setup    |
|set headless      |false               |
|set viewport width|1920|and height|1080|
|start browser     |chromium            |
  • Start writing tests using the playwright fixture

^|script| playwright fixture |
|navigate to             |https://praegus.nl/                                   |
|click                   |text=Plan een proof of concept                        |
|assert that page has url|https://praegus.nl/proof-of-concept-aanvraagformulier/|
|ensure                  |is visible  |text=Proof of Concept Aanvraagformulier  |

The first time the fixture is used Playwright will download the Chromium, Firefox and Webkit browsers from the Microsoft CDN. This may take some time. If you are behind a firewall or proxy downloading the browsers might be blocked. The Playwright documentation offers the following solution: Install behind a firewall or a proxy

About

Repo for the FitNesse Playwright fixture

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages