Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Align Page getBy* locators with Playwrights JS API#76

Open
braydend wants to merge 9 commits intoplaywright-php:mainfrom
braydend:feat/support-regex-in-playwright-locator-api
Open

Align Page getBy* locators with Playwrights JS API#76
braydend wants to merge 9 commits intoplaywright-php:mainfrom
braydend:feat/support-regex-in-playwright-locator-api

Conversation

@braydend
Copy link

@braydend braydend commented Mar 3, 2026

This PR makes some changes to the Page Locator API to align it closer to the Playwright JS API

  • Added Regex support for name fields and text selectors
  • Added PagePlaywrightApiTest integration test suite to test that the getBy* selectors align with the Playwright API
  • Updated existing tests to adhere to Regex support

@codecov
Copy link

codecov bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 98.78049% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Locator/RoleSelectorBuilder.php 87.50% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!


$this->assertStringContainsString('/page2.html', $this->page->url());
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved these to the new test file. @smnandre Please advise if these should live somewhere else.

My intention is to keep that test file as the source of truth against the Playwright JS API

@braydend braydend force-pushed the feat/support-regex-in-playwright-locator-api branch 2 times, most recently from 42a8931 to 3b50823 Compare March 3, 2026 04:26
@braydend braydend marked this pull request as draft March 3, 2026 04:27
@braydend braydend force-pushed the feat/support-regex-in-playwright-locator-api branch from 3b50823 to 1f2cecc Compare March 3, 2026 04:51
@braydend braydend force-pushed the feat/support-regex-in-playwright-locator-api branch from 1f2cecc to 6ecd3c0 Compare March 3, 2026 04:55
@braydend braydend marked this pull request as ready for review March 3, 2026 04:55
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