Skip to content

Feature: Playwright executor #843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

zikani03
Copy link

This PR adds a Playwright support to venom to allow users to perform end-to-end/integration Browser tests using Playwright. It uses the playwright-go library to perform the steps.

Steps to execute actions within playwright are called "Actions" and we have several actions supported so far (see the readme).

Some elements that may need further discussion before merging (if this feature is approved) include

  • Configuration and handling of timeouts
  • Ability to pass options to different actions (currently most actions use the default options playwright-go uses)
  • Whether to support running tests with multiple browsers (instead of just one)

Example usage

This PR enables the following

name: Playwright testsuite
testcases:
- name: Check the title
  steps:
    - type: playwright
      url: https://localhost:5173
      headless: true
      actions:
        - Fill "#email" "[email protected]"
        - Fill "#email" "[email protected]"
        - Fill "#password" "password"
        - Click "#loginButton"
        - WaitFor ".welcome-dashboard"
      assertions:
        - result.page.body ShouldContainSubstring Test Application
        - result.document.body ShouldContainSubstring Hello, Zikani
        - result.document.body ShouldContainSubstring Logout

The new playwright executor allows users to perform assertions
using playwright for integration testing web based applications.

Signed-off-by: Zikani Nyirenda Mwase <[email protected]>
Signed-off-by: Zikani Nyirenda Mwase <[email protected]>
The new actions section allows users to perform actions on the page
with playwright and then assert the results of the actions. Only
a few actions are supported currently: Click, Fill, WaitFor, WaitForURL

Signed-off-by: Zikani Nyirenda Mwase <[email protected]>
Signed-off-by: Zikani Nyirenda Mwase <[email protected]>
Signed-off-by: Zikani Nyirenda Mwase <[email protected]>
@zikani03 zikani03 force-pushed the feature/playwright-executor branch from 9e86b1a to 59e9454 Compare April 20, 2025 16:33
@zikani03 zikani03 force-pushed the feature/playwright-executor branch from 778715c to 9bcabaa Compare April 21, 2025 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant