diff --git a/modules/shell/scripts/e2e_window.py b/modules/shell/scripts/e2e_window.py index dfad716f..275a42d1 100644 --- a/modules/shell/scripts/e2e_window.py +++ b/modules/shell/scripts/e2e_window.py @@ -388,9 +388,12 @@ def show_tab(browser, key: str) -> None: """The meeting's tab — "minutes" or "transcript" — chosen when the page draws them as tabs (D121 4b, under 1400 px) and it is not chosen yet; nothing done otherwise: idempotent, side by side or already shown.""" tab = f"meeting-tabs-tab-{key}" - found = browser.find_elements(By.ID, tab) - if found and found[0].is_displayed() and found[0].get_attribute("aria-selected") != "true": - found[0].click() + # Read and pressed afresh, never through an element held: the page draws itself again when the shell writes one of + # its files, and a tab found a moment before is gone (#1412). + unchosen = ("const t = document.getElementById(arguments[0]);" + " return !!t && t.getClientRects().length > 0 && t.getAttribute('aria-selected') !== 'true'") + if browser.execute_script(unchosen, tab): + press(browser, tab) wait_for(browser, lambda b: b.find_element(By.ID, tab).get_attribute("aria-selected") == "true", 5)