Find and check the 'Enable Vibe Reactive' checkbox by label text.
(page)
| 141 | |
| 142 | |
| 143 | async def enable_vibe_reactive_checkbox(page) -> bool: |
| 144 | """Find and check the 'Enable Vibe Reactive' checkbox by label text.""" |
| 145 | # The checkbox label contains "Enable Vibe Reactive" |
| 146 | # The checkbox element is an input[type="checkbox"] next to that label |
| 147 | checked = await page.evaluate("""(() => { |
| 148 | // Find all labels and look for the one with "Enable Vibe Reactive" |
| 149 | const labels = document.querySelectorAll('label'); |
| 150 | for (const label of labels) { |
| 151 | if (label.textContent.includes('Enable Vibe Reactive')) { |
| 152 | // The checkbox is a sibling in the same flex container |
| 153 | const container = label.parentElement; |
| 154 | if (container) { |
| 155 | const checkbox = container.querySelector('input[type="checkbox"]'); |
| 156 | if (checkbox) { |
| 157 | // Just set checked - no events. UI manager uses polling. |
| 158 | checkbox.checked = true; |
| 159 | return true; |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | } |
| 164 | return false; |
| 165 | })()""") |
| 166 | return checked |
| 167 | |
| 168 | |
| 169 | async def get_frame_count(page) -> int: |