From 68cf43c5fa3fbe364bb05fb07b24cb06a664143d Mon Sep 17 00:00:00 2001
From: ValueOn AG
Date: Tue, 17 Feb 2026 17:13:09 +0100
Subject: [PATCH] feat: only Chromium Minimal variant + click Join in chat
header (step 6+7)
Co-authored-by: Cursor
---
src/bot/authTestProcedure.ts | 121 +++++++++++++++++++++++++++++------
1 file changed, 100 insertions(+), 21 deletions(-)
diff --git a/src/bot/authTestProcedure.ts b/src/bot/authTestProcedure.ts
index c3a76f3..e57d98d 100644
--- a/src/bot/authTestProcedure.ts
+++ b/src/bot/authTestProcedure.ts
@@ -48,31 +48,17 @@ export interface AuthTestResults {
// ============================================================================
const _VARIANTS: AuthTestVariant[] = [
- {
- id: 'chromiumClean',
- name: '1) Chromium Headful Clean',
- description: 'Playwright Chromium headful, enhanced stealth + realistic devices',
- },
- {
- id: 'chromiumNoAutomation',
- name: '2) Chromium No-Automation',
- description: 'Chromium headful + --disable-extensions, --no-first-run',
- },
- {
- id: 'rebrowserHeadful',
- name: '3) rebrowser-playwright',
- description: 'rebrowser-playwright headful, CDP-Leak-Fixes + realistic devices',
- },
+ // Paused: redirected to light-meetings
+ // { id: 'chromiumClean', name: '1) Chromium Headful Clean', description: '...' },
+ // { id: 'chromiumNoAutomation', name: '2) Chromium No-Automation', description: '...' },
+ // { id: 'rebrowserHeadful', name: '3) rebrowser-playwright', description: '...' },
{
id: 'chromiumMinimal',
name: '4) Chromium Minimal',
- description: 'Chromium headful, nur --no-sandbox (minimale Stealth)',
- },
- {
- id: 'chromiumHeadless',
- name: '5) Chromium Headless',
- description: 'Chromium headless als Baseline-Vergleich',
+ description: 'Chromium headful, nur --no-sandbox (minimale Stealth) — einzige Variante die auth schafft',
},
+ // Paused: redirected to light-meetings
+ // { id: 'chromiumHeadless', name: '5) Chromium Headless', description: '...' },
];
// ============================================================================
@@ -516,6 +502,99 @@ async function _runVariant(
}
await _screenshotStep('5 - Nach Join meeting');
+ // =====================================================================
+ // STEP 6: Click "Join" button in Teams chat header to join the call
+ // =====================================================================
+ _log('info', 'Step 6: Looking for "Join" button in Teams chat header...');
+
+ // Wait for the Teams chat page to fully render
+ try {
+ await page.waitForSelector(
+ 'button[data-tid="chat-join-button"], button[data-tid="join-call-button"]',
+ { timeout: 30000, state: 'visible' },
+ );
+ _log('info', 'Teams chat page loaded, "Join" button found');
+ } catch {
+ _log('warn', '"Join" button not found in chat header after 30s — logging all buttons');
+ try {
+ const buttons = await page.evaluate(() => {
+ const btns = document.querySelectorAll('button');
+ return Array.from(btns).slice(0, 30).map(b => {
+ const text = (b.textContent || '').trim().substring(0, 80);
+ const tid = b.getAttribute('data-tid') || '';
+ return `[BUTTON tid="${tid}"] ${text}`;
+ });
+ });
+ buttons.forEach(b => _log('info', ` ${b}`));
+ } catch {
+ // Ignore
+ }
+ }
+
+ await _screenshotStep('6 - Teams Chat (vor Join-Klick)');
+
+ // Click the "Join" button in the chat header
+ const chatJoinSelectors = [
+ 'button[data-tid="chat-join-button"]',
+ 'button[data-tid="join-call-button"]',
+ 'button:has-text("Join")',
+ 'button:has-text("Beitreten")',
+ ];
+
+ let chatJoinClicked = false;
+ for (const selector of chatJoinSelectors) {
+ try {
+ const btn = await page.waitForSelector(selector, { timeout: 5000, state: 'visible' });
+ if (btn) {
+ await btn.click();
+ _log('info', `Clicked chat "Join" button: ${selector}`);
+ chatJoinClicked = true;
+ break;
+ }
+ } catch {
+ // Try next
+ }
+ }
+
+ if (!chatJoinClicked) {
+ _log('warn', '"Join" button in chat header not found');
+ }
+
+ // Wait for the meeting to load after clicking Join
+ if (chatJoinClicked) {
+ _log('info', 'Waiting for meeting view to load...');
+ await page.waitForTimeout(5000);
+
+ // Wait for meeting UI elements (hangup button, video controls, etc.)
+ try {
+ await page.waitForSelector(
+ 'button[id="hangup-button"], button[data-tid="hangup-button"], [data-tid="prejoin-join-button"], [data-tid="calling-prejoin"]',
+ { timeout: 30000, state: 'visible' },
+ );
+ _log('info', 'Meeting UI elements detected');
+ } catch {
+ _log('warn', 'Meeting UI elements not found after 30s');
+ }
+
+ await page.waitForTimeout(5000);
+ }
+ await _screenshotStep('7 - Nach Join (Meeting-Ansicht)');
+
+ // Log all visible buttons on the final page for debugging
+ try {
+ const buttons = await page.evaluate(() => {
+ const btns = document.querySelectorAll('button');
+ return Array.from(btns).slice(0, 25).map(b => {
+ const text = (b.textContent || '').trim().substring(0, 80);
+ const tid = b.getAttribute('data-tid') || '';
+ return `[BUTTON tid="${tid}"] ${text}`;
+ });
+ });
+ buttons.forEach(b => _log('info', ` Final page button: ${b}`));
+ } catch {
+ // Ignore
+ }
+
// =====================================================================
// FINAL: Log result
// =====================================================================