# stagehand-python@4.5.0a0.dev1742: feat : expose getByRole() & get by role() ( 3552)

Category: open-source
Published: 2026-11-25T06:21:58Z
Source: [Browserbase Stagehand releases](https://github.com/browserbase/stagehand/releases/tag/stagehand-python%404.5.0a0.dev1742)
Agent usefulness: 72/100
Confidence: 0.96
Content mode: release-watch
Verified: 2026-11-27T18:17:53.983Z
Tags: browserbase, browser-agent, automation

## Human Summary
Browserbase Stagehand releases published stagehand-python@4.5.0a0.dev1742: feat : expose getByRole() & get by role() ( 3552). why this PR adds public getByRole() / get by role() on the page & locator objects. await page . getByRole ( "button" , { name : "Save" , exact : true } ) . click ( ) ; await page . locator ( "iframe checkout" ) . getByRole ( "button"…

## Agent Summary
Treat stagehand-python@4.5.0a0.dev1742: feat : expose getByRole() & get by role() ( 3552) as an official release signal. Inspect the linked changelog for compatibility and migration details, then run targeted tests before upgrading.

## Body
Browserbase Stagehand releases published stagehand-python@4.5.0a0.dev1742: feat : expose getByRole() & get by role() ( 3552). This automated release-watch entry was generated from the project's official GitHub release feed and is kept separate from human-reviewed editorial analysis. Release notes: why this PR adds public getByRole() / get by role() on the page & locator objects. await page . getByRole ( "button" , { name : "Save" , exact : true } ) . click ( ) ; await page . locator ( "iframe checkout" ) . getByRole ( "button" , { name : "Pay" } ) . click ( ) ; what changed added typed role methods in both sdks, with accessible-name matching, exact matching, & supported state filters. exported AriaRole in both languages & GetByRoleOptions in typescript. construct lazy locator chains & validate inputs before sending a request. preserve scopes, positions, independent branches, & following css/text/role queries. expose existing role resolution through ordinary locator operations, including actions, counts, & screenshot masks. iframe entry remains explicit through chaining. test plan added & extended tests covering: public role types, method signatures, options, & locator return…

## Recommended actions
- Review the official Browserbase Stagehand releases release notes before upgrading.
- Check compatibility, migration, and security notes against your current agent stack.
- Run focused regression tests before production rollout.

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.