playwright-python icon indicating copy to clipboard operation
playwright-python copied to clipboard

[Feature]: Add Electron support

Open cserby opened this issue 5 years ago • 36 comments

I'd like to ask if there is a chance (plan, roadmap) to have playwright-electron's functionality exposed in playwright-python as well.

We have a quite extensive e2e test framework and suite based on pytest, and recent good experiences with playwright-electron ignited some ideas about including our electron-based app in the e2e tests as well.

cserby avatar Dec 17 '20 07:12 cserby

That's actually very easy to do, especially if you are here to tell us if that worked.

We are prepping Python API to go stable (v1.8 instead of v0.180) and this will break all the APIs to make them snake_case. Will you be able to migrate your Playwright tests to snake_case to validate how Electron is working for you?

pavelfeldman avatar Dec 17 '20 21:12 pavelfeldman

Honestly, I'd be happy to, but we don't yet use playwright-python extensively as we're missing this functionality. We use playwright-electron in a standalone test framework, specifically targeted on our Electron-based app.

cserby avatar Dec 18 '20 07:12 cserby

Ok, so you don't have any existing playwright-python tests, that's cool. I'm leaving it open to collect more votes, but it is relatively straightforward, so I'm up for doing it right after we publish stable Python semver. Should be a couple of weeks. But it might be that someone picks it up sooner than that. @mxschmitt fyi

pavelfeldman avatar Dec 18 '20 07:12 pavelfeldman

@pavelfeldman What would be needed to get electron tests running with this? You said it should be very easy so perhaps you can point me in the direction to get started?

MrGreenTea avatar Mar 30 '21 07:03 MrGreenTea

@pavelfeldman Hey is this integrated already? Looking to get started with our Electron-based app.

rishabh-plivo avatar Apr 09 '21 11:04 rishabh-plivo

Do we maybe have an ETA? We're currently at a point, where we need to decide if we go for JS or python for implementing the next test framework for our products.

cserby avatar May 07 '21 09:05 cserby

Hey, unfortunately this issue got not much attention in the past, we thought about it but since Electron is JavaScript in the end the experience would be also much nicer when you use the normal Playwright for JavaScript or TypeScript directly which works today. See here: https://playwright.dev/docs/api/class-electron

mxschmitt avatar May 25 '21 10:05 mxschmitt

this would be really useful for python testers to migrate to electron app testing without needing to learn JavaScript

frederickishimwe avatar Dec 27 '21 15:12 frederickishimwe

+1

Our testers are interested too in testing electron apps with python (e.g. as it can be done with selenium).

zerocewl avatar Jan 03 '22 14:01 zerocewl

+1

trevorwang avatar Jan 12 '22 02:01 trevorwang

+1, we also want to use python to test electron app

jiangliq2000 avatar Mar 02 '22 01:03 jiangliq2000

+1, we also need this

vaffeljarnet avatar Mar 04 '22 11:03 vaffeljarnet

+1

spursbob avatar Mar 04 '22 20:03 spursbob

+1

@mxschmitt are there some docs around what features each client language will likely get? We would like to use this, but wouldn't want to risk missing key features if Python is a second class language in the tool.

robertlagrant avatar Jul 12 '22 13:07 robertlagrant

+1

@mxschmitt are there some docs around what features each client language will likely get? We would like to use this, but wouldn't want to risk missing key features if Python is a second class language in the tool.

Electron is still in beta in Node.js that's why we didn't port it yet.

mxschmitt avatar Jul 12 '22 14:07 mxschmitt

If and when this gets done, can the pytest plugin also be aware of this? At the moment, as far as I am aware, you can only control the browser from --browser and --browser-channel command line options for pytest. For an Electron application, maybe it could look something like --browser electron --browser-channel path/to/application?

uglybug avatar Aug 19 '22 09:08 uglybug

+1

Vinyzu avatar Nov 18 '22 15:11 Vinyzu

+1 I would also appreciate support for electron apps. It would be great to use pytest on frontend side, since I have already some tests on backend API written in it.

freetomik avatar Jan 04 '23 15:01 freetomik

+1 we are planning to have an electron app as well so this would be super useful. Already using playwright in python.

brad-adr-runtime avatar Feb 03 '23 14:02 brad-adr-runtime

I will also want @mxschmitt to add the python support There is a big community of python playwright implementors that need this support And we at israel are expecting at lease a roadmap regarding this At leasest a roadmap to start a python beta Please! @mxschmitt @pavelfeldman

amielnoy avatar Mar 16 '23 07:03 amielnoy

up vote 👍

AlexandrDimenko avatar Jul 26 '23 10:07 AlexandrDimenko

+1 - my company is all-in on Electron and our system verification writes test cases using Python

darronmcnutt avatar Oct 16 '23 00:10 darronmcnutt

+1 - Our company uses Cypress now and we want to move to playwright with Python (because our reason). To be sure we test the our electron application

ShaharM7 avatar Mar 11 '24 05:03 ShaharM7

+1 our company would also prefer to use Python for testing our Electron apps

huiskmi avatar Apr 15 '24 10:04 huiskmi

+1 our company would also prefer to use Python for testing our Electron apps(Theia apps)

luckymark avatar Apr 18 '24 04:04 luckymark