Skip to content

Comments

fix: update UI selectors and submission for current AI Studio#22

Open
mrowlinson wants to merge 1 commit intoMasuRii:mainfrom
mrowlinson:fix/aistudio-ui-selectors-and-submission
Open

fix: update UI selectors and submission for current AI Studio#22
mrowlinson wants to merge 1 commit intoMasuRii:mainfrom
mrowlinson:fix/aistudio-ui-selectors-and-submission

Conversation

@mrowlinson
Copy link

Summary

Google AI Studio updated its Angular UI, breaking the existing selectors and submission flow.

Changes

1. Submit button selector (config/selectors.py)

Added button.ctrl-enter-submits to SUBMIT_BUTTON_SELECTOR to match the current AI Studio submit button class.

2. Text input method (browser_utils/page_controller.py)

Replaced JavaScript element.value = text with Playwright's native fill() method. The JS approach bypassed Angular's reactive forms change detection — text appeared visually but Angular's internal model remained empty, preventing submission.

3. Submission method (browser_utils/page_controller.py)

Replaced the submit button click + tooltip dismissal flow with Meta+Enter keyboard shortcut. The _dismiss_tooltip_overlays() method was hanging indefinitely on the current UI, and Meta+Enter is more reliable.

Testing

  • macOS (Apple Silicon)
  • Camoufox v135.0.1-beta.24
  • Python 3.12
  • Successfully sends prompts and receives responses via /v1/chat/completions

Note

The Meta+Enter shortcut is macOS-specific. Linux/Windows users would need Control+Enter instead. Happy to add OS detection if needed.

Google AI Studio updated its Angular UI, breaking the existing selectors
and submission flow. This patch fixes three issues:

1. Submit button selector: Added 'button.ctrl-enter-submits' to match
   the current AI Studio submit button class.

2. Text input method: Replaced JavaScript element.value assignment with
   Playwright's native fill() method. The JS approach bypassed Angular's
   reactive forms change detection, leaving the internal model empty
   despite text being visually present.

3. Submission method: Replaced the submit button click + tooltip
   dismissal flow with Meta+Enter keyboard shortcut. The tooltip
   dismissal (_dismiss_tooltip_overlays) was hanging indefinitely
   on the current UI, and Meta+Enter is more reliable as it bypasses
   button state checks entirely.

Tested on macOS with Camoufox v135.0.1-beta.24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant