-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[js] Ensure 'selectVisibleByText' method is same as other languages #13899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
PR Description updated to latest commit (79b6650)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
diemol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @pujagani!
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Description
selectVisibleByTextwas implemented differently than other language bindings of Selenium. It did not account for text with spaces. The changes made here fix that.Motivation and Context
Ensure language parity regarding this particular feature.
Types of changes
Checklist
Type
Enhancement, Bug fix
Description
selectByVisibleTextinselect.jsto handle text with spaces and special characters more accurately.escapeQuotesandgetLongestSubstringWithoutSpaceto aid in XPath query generation.select_test.jsto ensure the robustness of the updatedselectByVisibleTextmethod.select_space.htmlto facilitate testing of the new selection capabilities.Changes walkthrough
select.js
Enhance selectByVisibleText and Support Special Charactersjavascript/node/selenium-webdriver/lib/select.js
constructor.
selectByVisibleTextto handle options with spaces and specialcharacters more robustly.
escapeQuotesandgetLongestSubstringWithoutSpacehelperfunctions.
isMultiplemethod to use a cached value of the multipleattribute.
fileserver.js
Add New Test Page for Select Elementjavascript/node/selenium-webdriver/lib/test/fileserver.js
testing.
select_space.html
New HTML Test Page for Select Elementcommon/src/web/select_space.html
functionality.
select_test.js
Extend Tests for New selectByVisibleText Logicjavascript/node/selenium-webdriver/test/select_test.js
escapeQuotesfunction handling different quotescenarios.