-
Notifications
You must be signed in to change notification settings - Fork 179
Fix WestOxfordshireDistrictCouncil #1726
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
base: master
Are you sure you want to change the base?
Conversation
combo box dropdown behavior appears to have changed
WalkthroughUpdated the XPath locator in the WestOxfordshireDistrictCouncil parser for identifying the first address result. The selector changed from "dropdown-element-23" to "combobox-input-23-1-23" and its nested ul element, modifying how the code waits for and clicks the initial matching address during the parse data flow. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes
Possibly related issues
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1726 +/- ##
=======================================
Coverage 86.79% 86.79%
=======================================
Files 9 9
Lines 1136 1136
=======================================
Hits 986 986
Misses 150 150 ☔ View full report in Codecov by Sentry. |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
uk_bin_collection/uk_bin_collection/councils/WestOxfordshireDistrictCouncil.py (1)
53-55: Consider documenting the BACKSPACE workaround.The pattern of sending keys, then BACKSPACE, then re-sending the last character is unusual. While this might be necessary to trigger JavaScript events on the page, adding a comment would help future maintainers understand why this workaround is needed.
address_entry_field.click() address_entry_field.send_keys(str(full_address)) +# Workaround: BACKSPACE + re-send last char triggers dropdown population address_entry_field.send_keys(Keys.BACKSPACE) address_entry_field.send_keys(str(full_address[len(full_address) - 1]))
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
uk_bin_collection/uk_bin_collection/councils/WestOxfordshireDistrictCouncil.py(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Run Integration Tests (3.12, 1.8.4)
- GitHub Check: Run Unit Tests (3.12, 1.8.4)
🔇 Additional comments (1)
uk_bin_collection/uk_bin_collection/councils/WestOxfordshireDistrictCouncil.py (1)
57-63: Verify that the XPath fix works in the actual environment and consider clicking the first list item for improved robustness.The ID
combobox-input-23-1-23follows a Salesforce Lightning component naming pattern and appears hardcoded specifically for this website's form structure. However, without test coverage for this scraper, there is no automated verification that this ID remains stable if the website's markup updates in the future.Additionally, clicking the
ulcontainer directly (line 63) remains unconventional—standard practice is to click childlielements. While it may work due to event bubbling, this approach is more fragile.Recommended actions:
- Confirm this fix works against the actual West Oxfordshire Council website
- Consider updating the selector to target and click the first
lichild instead of theulfor better maintainability:(By.XPATH, '//*[@id="combobox-input-23-1-23"]/ul/li[1]')
combo box dropdown behavior appears to have changed
Clicking the dropdown in selenium seems to cause it to disappear but clicking combo-input-23-1-23 seems to correctly select the first item in the list
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.