Skip to content

Add seeCurrentPathEquals method to ignore query strings#5435

Open
DavertMik wants to merge 1 commit into4.xfrom
feature/see-current-path-equals
Open

Add seeCurrentPathEquals method to ignore query strings#5435
DavertMik wants to merge 1 commit into4.xfrom
feature/see-current-path-equals

Conversation

@DavertMik
Copy link
Contributor

Adds new assertion method to check URL path equality while ignoring query parameters and URL fragments.

Usage

I.seeCurrentPathEquals('/info'); // passes for '/info', '/info?user=1', '/info#section'
I.seeCurrentPathEquals('/');     // passes for '/', '/?user=ok', '/#top'

Implementation

  • Uses native URL class for pathname extraction
  • Added to Playwright, Puppeteer, and WebDriver helpers
  • Includes tests and documentation

Closes #{add-issue-number-if-any}

Adds new assertion method to check URL path equality while ignoring
query parameters and URL fragments.

- I.seeCurrentPathEquals('/info') passes for '/info?user=1', '/info#section'
- I.seeCurrentPathEquals('/') passes for '/', '/?user=ok', '/#top'

Implemented in Playwright, Puppeteer, and WebDriver helpers using native
URL class for pathname extraction.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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