Repository: cypress-io/cypress
File: packages/driver/src/cypress.ts (TypeScript)

Code before:
        // Otherwise, this is a number and falls back to default
        return retriesAsNumberOrBoolean
      }

      return null
    }

    this.Cookies = $Cookies.create(config.namespace, domainName)

    // TODO: Remove this after $Events functions are added to $Cypress.
    // @ts-ignore
    this.ProxyLogging = new ProxyLogging(this)

    return this.action('cypress:config', config)
  }

  initialize ({ $autIframe, $autSnapshotIframes, onSpecReady, waitForStudio }) {
    this.$autIframe = $autIframe

    // Cypress-provided iframe elements used by Studio to render DOM snapshots
    // for Studio integrations.
    this.$autSnapshotIframes = $autSnapshotIframes

    // The container element holding the scaled AUT iframe and any $autSnapshotIframes.
    // Used by Studio to portal dynamic content.
    this.$autFramesContainer = $(document.getElementById('aut-frames-container')!)

    // The container element holding all AUT panel contents, including the AUT frame, snapshot controls, etc.
    // Used by Studio to portal dynamic content.
    this.$autPanelContainer = $(document.getElementById('aut-panel')!)

    this.onSpecReady = onSpecReady
    this.waitForStudio = waitForStudio
    if (this._onInitialize) {
      this._onInitialize()
      this._onInitialize = undefined
    }
  }

  run (cachedTestState: CachedTestState, fn) {
    if (!this.runner) {
      $errUtils.throwErrByPath('miscellaneous.no_runner')
    }

    this.state(cachedTestState)

    return this.runner.run(fn)
  }

  // Method to manually re-execute Runner (usually within $autIframe)
  // used mainly by Component Testing

Review comment (suggestion):
```suggestion
    this.$autIframesContainer = $(document.getElementById('aut-iframes-container')!)
```

Code after:
        }

        // Otherwise, this is a number and falls back to default
        return retriesAsNumberOrBoolean
      }

      return null
    }

    this.Cookies = $Cookies.create(config.namespace, domainName)

    // TODO: Remove this after $Events functions are added to $Cypress.
    // @ts-ignore
    this.ProxyLogging = new ProxyLogging(this)

    return this.action('cypress:config', config)
  }

  initialize ({ $autIframe, $autSnapshotIframes, onSpecReady, waitForStudio }) {
    this.$autIframe = $autIframe

    // Cypress-provided iframe elements used by Studio to render DOM snapshots
    // for Studio integrations.
    //
    // Including the first snapshot as $autSnapshotIframe for compatibility with
    // some Studio versions.
    this.$autSnapshotIframes = $autSnapshotIframes
    this.$autSnapshotIframe = $autSnapshotIframes?.[0] ?? null

    // The container element holding the scaled AUT iframe and any $autSnapshotIframes.
    // Used by Studio to portal dynamic content.
    const autIframesContainerElement = document.getElementById('aut-iframes-container')

    this.$autIframesContainer = autIframesContainerElement ? $(autIframesContainerElement) : null

    // The container element holding all AUT panel contents, including the AUT frame, snapshot controls, etc.
    // Used by Studio to portal dynamic content.
    const autPanelContainerElement = document.getElementById('aut-panel')

    this.$autPanelContainer = autPanelContainerElement ? $(autPanelContainerElement) : null

    this.onSpecReady = onSpecReady
    this.waitForStudio = waitForStudio
    if (this._onInitialize) {
      this._onInitialize()
      this._onInitialize = undefined
    }
  }

  run (cachedTestState: CachedTestState, fn) {
    if (!this.runner) {