-
Notifications
You must be signed in to change notification settings - Fork 43
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
[POC]- adding support for playwright #266
base: main
Are you sure you want to change the base?
Conversation
59c5f11
to
27fa02b
Compare
27fa02b
to
9446607
Compare
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this proof of concept is quite daring and a amazing start
we'll have to figure how to properly separate the engine types
the approach to prototype getting it to work at all, we will hit thousands of paper-cuts down the line when trying to integrate it with selenium-expecting downstream projects like kaifuku and other tools
additionally managing backend selection by 2 optionals makes for very fragile code in the long run (but it is a good trade-off when demonstrating initial viability of a idea)
we need to more strictly separate them and evolve a reasonably share-able interface plus in addition to that a sane ci process to ensure it works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file needs to go
@@ -225,12 +227,14 @@ class as plugin. | |||
|
|||
def __init__( | |||
self, | |||
selenium: WebDriver, | |||
selenium: WebDriver = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should try to ensure that the browser turns unaware of Webdriver vs Page
we need to investigate whether this an be done by new mixins or an additional helper that abstracts the engine
[POC] Playwright Support for Widgetastic
Playwright Integration in Widgetastic
Widgetastic now supports Playwright in addition to Selenium, giving users more flexibility in browser automation. With Playwright, you can perform actions such as:
Running Tests with Playwright
You can easily switch between Selenium and Playwright for testing. Here's how to get started:
Install Playwright:
Run Tests with Playwright: Use the
--engine
option to select Playwright:Choose a Browser: You can specify which browser to use with the
--browser-name
option:Optional Features:
Run tests in headless mode:
pytest --engine=playwright --headless
Enable tracing for debugging:
pytest --engine=playwright --trace_view
Record video of the tests:
pytest --engine=playwright --record_video