Client is not accessing second window. Is it possible?
See original GitHub issueI have an app that opens first window, does a little thing, closes the first window, and opens the second one.
When in the first window, all client APIs work.
But when in the second one, app.client.getHTML('body')
throws
Stack:
RuntimeError: no such window: target window already closed
from unknown error: web view not found
at execute(<Function>) - selectorExecute.js:97:75
at execute("return !!document.evaluate;") - ensureClientSideSelectorSupport.js:23:17
Is it possible at all to web-drive the second window?
Note that in both cases, app.client.getWindowCount()
produces 1
, as only one window is open, and app.client.windowHandles()
changes as well.
Can a handle be used to redirect client to a new window? Or, something like this.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Can't access shared folders from File Explorer - Windows Client
Open Registry Editor. · Go to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\LanmanWorkstation . Note · Press and hold (right- ...
Read more >Screen sharing is not working - Zoom Support
If screen sharing is disabled or not working during a meeting, there are several things you can check to fix this issue.
Read more >Install the User Client on Windows - PaperCut
Install the User Client on Windows. You can deploy the PaperCut NG/MF User Client to workstations using a variety of deployment methods.
Read more >Using Group Policy Settings to Configure Horizon Client
The client can fall back to another authentication method if Unauthenticated Access is not available. When this setting is disabled, ...
Read more >Windows troubleshooting - AWS Client VPN
Troubleshoot Windows connection issues to a Client VPN connection. ... Another OpenVPN process is already running on your computer, which prevents the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The unique ID’s are in the
values
property ofapp.client.windowHandles()
and you can callapp.client.window(windowHandleValue)
to focus a different window.Don’t forget we have full access to WebDriver IO methods.
http://webdriver.io/api/protocol/window.html
So you could do this yourself with.
Most of what spectron does is expose the WebDriver methods and the Electron methods in the same object to make testing ridiculously easy. Lots of the power / methods you are asking for is already part of the WebDriver methods.
app.client.window
is not exists…I can get
from
const handles = await this.app?.client?.getWindowHandles();
but how to get actual window handle, and do
window.$(selector)
?