-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Use playwright
for desktop smoke tests
#128479
Comments
Simple code to bring up Code: const { _electron } = require('playwright');
const electronApp = await _electron.launch({ executablePath: '/Users/bpasero/Desktop/Visual Studio Code - Insiders.app/Contents/MacOS/Electron' }); The |
Yeah, that the option I mentioned a couple months ago when we discussed this. I’m glad to know it just works, fantastic! Shouldn’t be too hard to get the existing Playwright driver to run our smoketests. Just some glue code, hopefully. |
playwright
for desktop smoke tests
Did a quick exploration in a hello world sample and was not able to get screenshots from the tracing, filed microsoft/playwright#13180 |
Nevermind, I might have validated wrong, according to Pavel they should work. I think we need to revisit this when we pick up the work again to see. |
@bpasero I guess I am a bit too late for this but just so you and the team is aware we @stateful have invested time to build an integration into WebdriverIO that allows to run browser and Electron tests on Windows, Mac and Ubuntu. As part of this integration we will maintain a set of page objects for VSCode that avoids breaking builds due to changing locators in the app. |
Thats cool, but I am not sure exactly what the ask is? We will stay with |
No ask here. Just wanted to let you know that there is a web standard based alternative 😉 |
Cool, but wouldn't it make sense to let |
We are using
playwright
for our browser tests (#128061) and should explore to use this library also for our Electron based smoke tests.Update (Nov 2021, @bpasero)
We now have a branch up and running with
playwright
for Electron smoke tests: #136367However, there are blocking issues:
window.driver
and rely purely onplaywright
APIs for the driverplaywright
too[1]
When the extension host connection hangs, messages that are passed between window process and extension host process (node.js socket / named pipe) are not fully transmitted. Since messages are not fully delivered, our protocol that is implemented on top does not work. Either the extension host is not receiving the initialization data from the window or the extension host is unable to acknowledge that it is ready.
We believe this may be related to how
playwright
enablesremote-debugging-port
which is something we never have enabled otherwise. Possibly this results in unknown runtime behaviour when the browser window has node.js enabled. We should revisit this when we havesandbox
enabled, though it might still not be an option given the shared process will remain node.js enabled for the time being.The text was updated successfully, but these errors were encountered: