Skip to content

Looped flow fails when "coming back" to the main window. #3271

@BigBlueHat

Description

@BigBlueHat

I'm attempting to test https://vcplayground.org/issuer with Maestro. Doing one test with one credential option from that page (i.e. "Alumni" or other) works great! It also works fine if I pick one of the flows on that site which do not require pop-ups. However, some of the options (available under the gear menu) invoke a pop-up (initiated from an iframe). That works fine for a single flow and results in the expected screenshot at the "completed" step.

However, if I try to loop through multiples (even just 2...), I get this error:

[ WARN] maestro.drivers.CdpWebDriver.fetchCrossOriginIframeContent: Could not find iframe element with src https://authn.io/mediator
org.openqa.selenium.NoSuchWindowException: no such window: target window already closed
from unknown error: web view not found
  (Session info: chrome=147.0.7727.138)
Build info: version: '4.40.0', revision: 'b3333f1'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '25'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [98f1d72528ba59d38965f656f9d20221, executeScript {script=return [...document.querySelectorAll('iframe')].find(f => f.src === arguments[0]);, args=[https://authn.io/mediator]}]
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 147.0.7727.138, chrome: {chromedriverVersion: 147.0.7727.117 (474cc805edd..., userDataDir: C:\Users\bigbl\AppData\Loca...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:60976}, goog:processID: 53516, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: windows, proxy: Proxy(), se:cdp: ws://localhost:60976/devtoo..., se:cdpVersion: 147.0.7727.138, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}

The iframe it's looking for is where the pop-up is initiated from. It is also still in the page being screenshot.

What seems to be happening is that Maestro is looking for that iframe inside that iframe?

I've tried various approaches to end the script and all of the following result in that same error:

- launchApp

- stopApp
- launchApp

- openLink: "https://vcplayground.org/issuer"

- tapOn: "Go Home"

I'd expected that restarting the app would have "broken free" and "started over"...but that doesn't seem to be the case here, for some reason.

I know this is flying blind a bit (as I'm still writing these tests...), but I was hoping others might have experienced something similar and have some insights.

Thanks!
🎩

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: webTesting web apps is affected

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions