fix: update UI selectors and submission for current AI Studio#22
Open
mrowlinson wants to merge 1 commit intoMasuRii:mainfrom
Open
fix: update UI selectors and submission for current AI Studio#22mrowlinson wants to merge 1 commit intoMasuRii:mainfrom
mrowlinson wants to merge 1 commit intoMasuRii:mainfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-submitstoSUBMIT_BUTTON_SELECTORto match the current AI Studio submit button class.2. Text input method (
browser_utils/page_controller.py)Replaced JavaScript
element.value = textwith Playwright's nativefill()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+Enterkeyboard shortcut. The_dismiss_tooltip_overlays()method was hanging indefinitely on the current UI, andMeta+Enteris more reliable.Testing
/v1/chat/completionsNote
The
Meta+Entershortcut is macOS-specific. Linux/Windows users would needControl+Enterinstead. Happy to add OS detection if needed.