Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(tests): wait for iframe to exist before switching in iFrame API tests

damenchoed111e0df869
diff --git a/tests/helpers/Participant.ts b/tests/helpers/Participant.ts
index a6379b1af7..fc5c6d54ef 100644
--- a/tests/helpers/Participant.ts
+++ b/tests/helpers/Participant.ts
@@ -742,6 +742,10 @@ export class Participant {
const iframe = this.driver.$('iframe');
+ // The External API inserts the iframe asynchronously after the wrapper page loads, so wait for it to exist
+ // before switching rather than failing immediately with "iframe doesn't exist" on slower backends.
+ await iframe.waitForExist({ timeout: 10_000 });
+
await this.driver.switchFrame(iframe);
this._inMainFrame = false;
}