-
Notifications
You must be signed in to change notification settings - Fork 143
Fill->type to trigger drop down #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Inefficient Event Synchronization ▹ view | ✅ Fix detected | |
| Silent Error Swallowing ▹ view | ✅ Fix detected |
Files scanned
| File Path | Reviewed |
|---|---|
| browsergym/core/src/browsergym/core/env.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
| try: | ||
| self.page.wait_for_load_state("domcontentloaded", timeout=1500) | ||
| except playwright.sync_api.Error: | ||
| pass |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
| time.sleep(self.pre_observation_delay) # wait for JS events to be fired | ||
| self.context.cookies() # trigger all waiting Playwright callbacks on the stack (hack, see https://playwright.dev/java/docs/multithreading) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
gasse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
|
||
| # https://playwright.dev/docs/input#text-input | ||
| def fill(bid: str, value: str): | ||
| def fill(bid: str, value: str, enable_autocomplete_menu: bool = False): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe trigger_autocomplete: bool would be more explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a test to make sure the autocomplete stuff works as intended?
* fix bbox scale in extra_properties and prevent extract_screenshot from clearing CDP * add the n_repeats argument to benchmark creation * in prep of modifying dom_wait * fill function "types" the last character to trigger autocomplete in ui * reverting to old dom_wait temporarily * Revert to old behaviour as default * sneaking in this little change
Description by Korbit AI
What change is being made?
Enhance the
fillfunction to optionally trigger an autocomplete menu by typing the last character and introduce a configurable delay (pre_observation_delay) in the environment to account for autocomplete menus before extracting observations. Update the test case to reflect the demo mode timing adjustments.Why are these changes being made?
The changes facilitate interaction with autocomplete fields during typing by simulating user input that triggers autocomplete menus, making automated testing and interaction more realistic. The
pre_observation_delayensures that there is a sufficient pause to allow for these menus to appear, which improves the robustness of observation extraction. These modifications reflect a need for more responsive and adaptable interaction timing in user input simulations.