Skip to content

Sync python-selenium with the updated tutorial - #878

Merged
martin-martin merged 2 commits into
masterfrom
maintenance/modern-web-automation-with-python-and-selenium-20261008
Oct 8, 2026
Merged

martin-martin merged 2 commits into
masterfrom
maintenance/modern-web-automation-with-python-and-selenium-20261008

Conversation

@realpython-bot

@realpython-bot realpython-bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Re-pins python-selenium/requirements.txt (and refreshes uv.lock) to match the tutorial's maintenance update, which bumps the tested-with Selenium pin from 4.48.0 to 4.50.0 (current PyPI release). The previous materials pins were selenium==4.29.0. Transitive dependencies are re-pinned to their current releases (attrs 26.1.0, certifi 2026.7.22, h11 0.16.0, idna 3.20, trio 0.34.0, typing-extensions 4.16.0, urllib3 2.8.0, websocket-client 1.9.2, wsproto 1.3.2). No code changes.

Verification

  • Fresh Python 3.14 venv with pip install -r requirements.txt .: every bandcamp module imports cleanly on Selenium 4.50.0.
  • training/navigation.py runs green with headless Firefox (Selenium Manager fetched the browser and driver).
  • uvx ruff@0.14.1 format --check and ruff check pass.
  • Heads-up, not caused by this PR: training/interaction.py and observation.py (#view-more could not be scrolled into view) and the discover app (div.meta p a not found) fail identically on the old 4.29.0 pins. The cause is live Bandcamp DOM drift, which needs a separate code update. communication.py needs a display (non-headless), so it couldn't run on the CI box.

Update: locator fix for Bandcamp's redesign (commit 0d022d2)

The DOM drift noted above is now fixed, matching the full update of the article draft:

  • locators.py: track locators point at the new card markup (a.stretch-link, div.title, div.attribution-meta, div.info-pill), and the cookie dialog uses div.cookie-control.
  • training/navigation.py, communication.py, observation.py: same locator changes. observation.py now waits for #view-more to be clickable before clicking, because the closing cookie dialog otherwise races the click.
  • base.py: drops the implicit wait, so the page objects use explicit waits only.
  • pyproject.toml pins selenium==4.50.0, and the README uses the discover command and mentions Selenium Manager.

Verified on Python 3.14.6, Selenium 4.50.0, Firefox 157.0.1, and geckodriver 0.37.1: the training scripts and the discover app (tracks, play, pause, more, exit) all run against the live site. ruff format --check and ruff check pass.

🤖 Generated with Claude Code

realpython-bot and others added 2 commits October 8, 2026 06:14
…tion With Python and Selenium

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Point track locators at the new card markup (a.stretch-link, div.title,
  div.attribution-meta, div.info-pill)
- Use div.cookie-control for the cookie consent dialog
- Wait for #view-more to be clickable before clicking it in observation.py
- Drop the implicit wait from the page-object base class
- Pin selenium==4.50.0 in pyproject.toml and refresh the README

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@martin-martin
martin-martin merged commit 2fa006c into master Oct 8, 2026
1 check passed
@martin-martin
martin-martin deleted the maintenance/modern-web-automation-with-python-and-selenium-20261008 branch October 8, 2026 09:18
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.

2 participants