Skip to content

Conversation

@debasisj
Copy link
Owner

Introduces a new test suite for handling locators with special characters. Updates README with improved documentation and SEO, refines package metadata, and enhances Playwright config and smart locator logic for better test automation support.

Introduces a new test suite for handling locators with special characters. Updates README with improved documentation and SEO, refines package metadata, and enhances Playwright config and smart locator logic for better test automation support.
Copilot AI review requested due to automatic review settings September 28, 2025 13:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces comprehensive support for handling special characters in locators and enhances the overall test automation framework. The changes focus on making the SmartLocator class more resilient when dealing with text containing quotes, apostrophes, backslashes, and other special characters that could break CSS selectors and XPath expressions.

Key Changes

  • Added comprehensive text escaping functionality for CSS selectors and XPath expressions to handle special characters safely
  • Introduced a new test suite specifically for validating special character handling in various locator scenarios
  • Enhanced existing locator strategies throughout the codebase to use proper text escaping

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/special-characters.spec.ts New test suite validating special character handling in text-based locators
src/smart-locator.ts Enhanced locator methods with proper text escaping for CSS and XPath selectors
playwright.config.ts Enabled web server configuration for improved test setup
package.json Added Jest-related dependencies for expanded testing capabilities
README.md Updated documentation with improved SEO and comprehensive feature descriptions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

debasisj and others added 3 commits September 28, 2025 23:15
The webServer configuration has been commented out in playwright.config.ts, likely to disable automatic server startup during tests or to allow for manual server management.
Updated SmartLocator to use Playwright's default exact text matching instead of fuzzy matching for getByText calls. This change improves selector accuracy and avoids unintended matches.
@debasisj debasisj merged commit 6c64d1e into main Sep 29, 2025
2 checks passed
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