wdio-vscode-service
wdio-vscode-service copied to clipboard
Don't do anything if webview was opened and re-opened again
Given a user tries to open a webview and verifies that an element exists, e.g.:
await browser.waitUntil(async () => {
const webviews = await workbench.getAllWebviews()
if (webviews.length === 0) {
return false
}
await webviews[0].open()
return $('#runme-examples').isExisting()
})
If first condition was not met then it also won't get re-checked because webviews[0].open()
stales as it is already within the iframe.
Proposal:
Check if browser already entered the iframe and exit method if so.