-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Added getValue() method #15480
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
Added getValue() method #15480
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
|
Thank you for your contribution! The endpoint: is already implemented by While I can see the value of having a convenience method to get the value property in some use cases, it is easy to add in your own framework, and we're trying not to add simple wrapping methods to these already large classes. I'm going to close this, but thank you again for submitting a PR. |
|
Hi
Thank you for reviewing my PR and providing valuable feedback. I understand
that getAccessibleName() already implements the required functionality, and
adding a wrapper method may not be ideal due to class size considerations.
I appreciate the insight and will keep this in mind for future
contributions. However, I was wondering—would you suggest an alternate way
to make value retrieval more convenient without adding an extra method? I'd
love to explore if there's a more efficient approach.
Thanks again for your time and guidance!
Best regards,
Omkar
…On Sat, 22 Mar 2025 at 08:57, Titus Fortner ***@***.***> wrote:
Thank you for your contribution!
The endpoint: /session/{session id}/element/{element id}/computedlabel
is already implemented by getAccessibleName()
https://github.com/SeleniumHQ/selenium/blob/123bb677/java/src/org/openqa/selenium/remote/RemoteWebElement.java#L158-L160
While I can see the value of having a convenience method to get the value
property in some use cases, it is easy to add in your own framework, and
we're trying not to add simple wrapping methods to these already large
classes.
I'm going to close this, but thank you again for submitting a PR.
—
Reply to this email directly, view it on GitHub
<#15480 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AT23NNCMAHLHZFXEWUBYKG32VTKB5AVCNFSM6AAAAABZRHDWUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBUHE2DKOBTGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: titusfortner]*titusfortner* left a comment
(SeleniumHQ/selenium#15480)
<#15480 (comment)>
Thank you for your contribution!
The endpoint: /session/{session id}/element/{element id}/computedlabel
is already implemented by getAccessibleName()
https://github.com/SeleniumHQ/selenium/blob/123bb677/java/src/org/openqa/selenium/remote/RemoteWebElement.java#L158-L160
While I can see the value of having a convenience method to get the value
property in some use cases, it is easy to add in your own framework, and
we're trying not to add simple wrapping methods to these already large
classes.
I'm going to close this, but thank you again for submitting a PR.
—
Reply to this email directly, view it on GitHub
<#15480 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AT23NNCMAHLHZFXEWUBYKG32VTKB5AVCNFSM6AAAAABZRHDWUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBUHE2DKOBTGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
This is an example of how I wrap the WebElement from a workshop I teach: I don't love all of this code, but it is useful for demonstration purposes. If I found myself doing a lot of |
User description
Title:
Added
getValue()method toWebElementMotivation and Context:
getValue()method toWebElement, allowing users to retrieve the computed accessible name of an element.Types of changes:
Checklist:
👉 Reviewers: Please let me know if any modifications are needed! 🚀
PR Type
Enhancement
Description
Added
getValue()method toWebElementinterface for retrieving element values.Implemented
getValue()inRemoteWebElementto fetch the value attribute.Enhanced accessibility and programmatic access to element properties.
Changes walkthrough 📝
WebElement.java
Added `getValue()` method to `WebElement` interfacejava/src/org/openqa/selenium/WebElement.java
getValue()method to retrieve the value attribute.WebElementinterface.RemoteWebElement.java
Implemented `getValue()` in `RemoteWebElement`java/src/org/openqa/selenium/remote/RemoteWebElement.java
getValue()method to return the value attribute.getDomProperty("value")for fetching the value.