Skip to content

[🚀 Feature]: Documentation example is using a deprecated API, it should be updated #2207

Open
@amitbiswal007

Description

@amitbiswal007

Feature and motivation

This is regarding the official documentation under the page
"Webdriver > Elements > Information"
https://www.selenium.dev/documentation/webdriver/elements/information/

In this page, there is an example under the section "Fetching Attributes or Properties".
This example uses the below API in Java.
String valueInfo = emailTxt.getAttribute("value");

Image

However, In latest Java libraries, we can see that "getAttribute()" method is deprecated. The official documentation suggests the usage of [getDomProperty(String)] or [getDomAttribute(String)]
See Reference - https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/WebElement.html#getAttribute(java.lang.String)

The documentation example should be updated with the latest library methods instead of using a deprecated method.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions