[js] Ensure 'selectVisibleByText' method is same as other languages#13899
[js] Ensure 'selectVisibleByText' method is same as other languages#13899pujagani merged 1 commit intoSeleniumHQ:trunkfrom
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. |
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.