wdio-vscode-service icon indicating copy to clipboard operation
wdio-vscode-service copied to clipboard

Don't do anything if webview was opened and re-opened again

Open christian-bromann opened this issue 2 years ago • 0 comments

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.

christian-bromann avatar Nov 15 '22 21:11 christian-bromann