Comments (8)
Also, while the class constructors have keys, they are all undefined
from playwright.
This sounds expected, you can access ipcRenderer
in the renderer process (BrowserWindow's) of your Electron application. Usually you are using sandboxing, so its only available inside the preload.
from playwright.
The type is intended to not match runtime behaviour?
from playwright.
electronApp.evaluate
will run in the Electron main process which is different to the render process. So from my side this seems all working as intended and the type is matching. Could you elaborate more on that?
from playwright.
The issue is not that ipcRenderer is not available. The issue is that the type does not reflect the structure of the value at runtime. As illustrated in the image in the original post. It's a diff of the keys specified by the type and the actual keys in the object. Plus the value for all of the PascalCase keys is undefined
, also contradicting the type.
The issue is not that ipcRenderer is not on the object. The issue is that the type says it is.
from playwright.
contextBridge, ipcRenderer, webFrame, webUtils
sounds expected to me that they are missing, according to the Electron docs these properties are only available in the Electron renderer process: https://www.electronjs.org/docs/latest/api/ipc-renderer.
For the PascalCase style attributes, this looks wrong to me, since even their official don't work with the latest Electron:
// @ts-check
// As per https://github.com/electron/electron/blob/main/docs/api/web-contents-view.md#webcontentsview
const { BaseWindow, WebContentsView } = require('electron')
// As per https://github.com/electron/electron/blob/main/docs/api/view.md
const { BaseWindow, View } = require('electron')
const win = new BaseWindow()
const view = new View()
from playwright.
As by talking to folks on Electron side (thanks @codebytere), BaseWindow and WebContentsView are classes which were already exposed in Electron v29 but were not officially released yet. As part of Electron v30, they are in their public API -> types and by that exposed.
Closing by that since there is no action item on our side.
from playwright.
I don't understand how any of this justifies the fact the types do not reflect runtime values.
If ipcRenderer is never attached to this object, why does the type say it always is?
Why are there 9 keys that the type says are class constructors but in reality are nothing?
Also, I need the Menu constructor so I can test my app. Is there any way of getting it?
from playwright.
Related Issues (20)
- [Bug]: Multiple Playwright instances causes Playwright UI to drop data after tests run HOT 6
- [Feature]: Allow adding tags to tests on the fly HOT 3
- [Bug]: trace not recorded for "workerStorageState"
- [Bug]: Browser object is not restarted after a passed test for two consecutive test.describe HOT 6
- [Feature]: How to pass a NodeJS function to `page.evaluate`? HOT 2
- [Bug]: Invalid http status code or phrase (chromium) HOT 1
- [Bug]: tests not reading from storageState HOT 8
- [Bug]: UI is stuck on pending and only outputs "Unable to read D:\Work\<spec folder>" HOT 2
- [Bug]: Different projects with different dependencies do NOT run at the same time increasing time & underutilising resources (workers) HOT 2
- [Feature]: leverage docker image with Bun preinstalled HOT 3
- [Feature]: support code coverage in vscode extension
- [Docs]: Unclear docs on broser.close() behavior about closing attached contexts HOT 5
- [REGRESSION]: UI mode restarts if keep storage state HOT 6
- [Question] Running playwright tests in Kubernetes HOT 1
- [Bug]: "Your Firefox profile cannot be loaded. It may be missing or inaccessible" error when launching firefox HOT 5
- [Bug]: Can't dispatch events on document or window objects HOT 4
- [Feature]: UI Mode - Set number of workers in ui mode interface
- [Bug]: My site is not able to login on Webkit although Chromium & Firefox are working smoothly HOT 7
- [Regression]: Playwright hangs during test HOT 7
- [Feature] Option turn on/off or override After hooks HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playwright.