-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix: combobox can be fill directly without click for google flight #3448
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
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Just a couple quick comments @YunfeiZHAO, good job!
Other than the formatting related comments would you mind changing the logic so that the try-catch logic is simpler as there are currently 3 levels of try-catch in a very small section of code.
| await element.fill(text, { timeout: 3000, force: true }); | ||
|
|
||
| } else { | ||
| try{ |
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.
| try{ | |
| try { |
missing space
camel/toolkits/hybrid_browser_toolkit/ts/src/browser-session.ts
Outdated
Show resolved
Hide resolved
Yeah, let me think about it ! |
Wendong-Fan
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.
thanks @YunfeiZHAO and @nitpicker55555 , a potential issue in the error handling path: when click-then-fill fails, the code catches the error and then clicks the element again at lines 801-809 to trigger dynamic content. However, we've already clicked once during click-then-fill, would this results in an unnecessary double-click which could cause unintended behavior?
|
added one pr: #3463 @YunfeiZHAO @nitpicker55555 |
merged! |
ankithsavio
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.
Fixes issue where snapshot changes due to click-first fill, Thanks!
Description
In Google Flight, we had trouble filling in the destination combobox with the browser toolkit.
This PR is to change the Type action behaviour to first try to fill the text directly (This works for the combobox on Google Flight), if it fails, we try to click first, then fill in the text.
Checklist
Go over all the following points, and put an
xin all the boxes that apply.Fixes #issue-numberin the PR description (required)pyproject.tomlanduv lockIf you are unsure about any of these, don't hesitate to ask. We are here to help!