-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[java] Unifying select class #16220
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
[java] Unifying select class #16220
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
Could you please run ./scripts/format.sh
?
@vicky-iv can you also remove the changes in the 2 files that change I don't know who uses those specific files, but we still support JDK11 and probably should leave those as they were. |
@diemol @cgoldberg done and done, thanks for your comments |
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, @vicky-iv! Looking forward to future contributions.
User description
🔗 Related Issues
[🚀 Feature]: Unifying Select Class Across All Bindings #15265
💥 What does this PR do?
I implemented unifying the Select class across all bindings for the Java package.
I also extended the unit tests to cover this functionality by shadowing PR for python #15135
🔧 Implementation Notes
The
selectByContainsVisibleText
method already had the necessary implementation, so I just added the missing exception throwing for theselectByVisibleText
method.All tests from the following packages are passed locally:
//java/test/org/openqa/selenium/support/ui/...
💡 Additional Considerations
No
🔄 Types of changes
Bug fix (backwards compatible)
PR Type
Bug fix
Description
Fix
selectByVisibleText
to throw exception for hidden optionsAdd visibility checks to prevent selecting invisible elements
Enhance test coverage for hidden option scenarios
Update Java language level to JDK 17
Diagram Walkthrough
File Walkthrough
Select.java
Add visibility validation to selectByVisibleText
java/src/org/openqa/selenium/support/ui/Select.java
assertSelectIsVisible()
call toselectByVisibleText
methodhasCssPropertyAndVisible()
for optionsNoSuchElementException
when trying to select invisible optionsSelectElementTest.java
Enhance tests for hidden option validation
java/test/org/openqa/selenium/support/ui/SelectElementTest.java
selectByVisibleText
instead ofselectByContainsVisibleText
shouldThrowExceptionOnSelectByVisibleTextIfOptionHidden
misc.xml
Update IntelliJ project to JDK 17
.idea/misc.xml
java.iml
Update module language level to JDK 17
java/java.iml