You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting started with Spectron, this was one of the many things that frustrated me. I don't recall which one solved this particular problem, but you may try these:
Make sure you avoid opening devTools. I use cross-env NODE_env=test mocha in package.json and then use it in main.js to skip opening devTools and extensions.
If you are developing on Linux, run this command once per desktop session. This seems to be needed for newer versions of electron
Having the same issue here, The problem seems to be related to contextIsolation: true, if you set it to false it works but you can't use contextBridge on your preload.js since contextBridge require contextIsolation to be true.
If you log the value of app.electron with contextIsolation: true, it is undefined but with contextIsolation: false, it contains an object.
I try adding this line to preload. js without luck contextBridge.exposeInMainWorld('electronRequire', require);
I am using electron version "6.1.9" and spectron "8.0.0" , node integration in my electron app is set to "true"
I am rendering a website inside "webview" tag and I want to test some component on the web site which is inside "webview" tag
When I run app.client.getwindowcount() , I see it returning window count as 2. Below is the code snippet which is failing.
Code Snippet:
await app.client.windowByIndex(1) await app.client.waitUntilWindowLoaded()
Below are the web preferences set inside my electron application:
webPreferences: { nativeWindowOpen: false, nodeIntegration: true, contextIsolation: true, webviewTag: true, enableRemoteModule: false, preload: path.join(__dirname, ".//", "preload.js") }
Please help me with this issue.
The text was updated successfully, but these errors were encountered: