Skip to content

Conversation

@MathewBurnett
Copy link
Contributor

@MathewBurnett MathewBurnett commented Nov 20, 2025

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

  • Bug Fixes
    • Fixed address lookup functionality for West Oxfordshire District Council bin collection queries to ensure proper selection and processing of entered addresses.

✏️ Tip: You can customize this high-level summary in your review settings.

combo box dropdown behavior appears to have changed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 20, 2025

Walkthrough

Updated 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

Cohort / File(s) Summary
West Oxfordshire address locator update
uk_bin_collection/uk_bin_collection/councils/WestOxfordshireDistrictCouncil.py
Updated XPath selector from "dropdown-element-23" to "combobox-input-23-1-23" with nested ul for locating the first address result in the address selection flow

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single file modification with straightforward selector update
  • Change is localized to address locator logic with no logic flow modifications
  • Straightforward to verify the new selector targets the correct DOM element

Possibly related issues

Suggested reviewers

  • dp247

Poem

🐰 A selector's dance on the web's grand stage,
From dropdown to combobox, we turn the page,
Where addresses gather in lists so neat,
One click, one address—the selection's sweet! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Fix WestOxfordshireDistrictCouncil' is vague and generic, using only the word 'Fix' without specifying what was actually fixed or what the core issue is. Consider a more specific title like 'Fix WestOxfordshireDistrictCouncil dropdown selector' or 'Update WestOxfordshireDistrictCouncil XPath for combo box dropdown' to clearly convey the nature of the fix.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.79%. Comparing base (37c8a80) to head (bf5b161).

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 37c8a80 and bf5b161.

📒 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-23 follows 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 ul container directly (line 63) remains unconventional—standard practice is to click child li elements. While it may work due to event bubbling, this approach is more fragile.

Recommended actions:

  1. Confirm this fix works against the actual West Oxfordshire Council website
  2. Consider updating the selector to target and click the first li child instead of the ul for better maintainability:
    (By.XPATH, '//*[@id="combobox-input-23-1-23"]/ul/li[1]')

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