diff --git a/dotnet/src/support/Events/EventFiringWebDriver.cs b/dotnet/src/support/Events/EventFiringWebDriver.cs index e68b261e387c3..cfcc7d0cc5154 100644 --- a/dotnet/src/support/Events/EventFiringWebDriver.cs +++ b/dotnet/src/support/Events/EventFiringWebDriver.cs @@ -1613,6 +1613,7 @@ public void Click() /// /// Attribute you wish to get details of /// The attribute's current value or null if the value is not set. + [Obsolete("Use GetDomAttribute(string attributeName) or GetDomProperty(string propertyName). GetAttribute(string attributeName) will be removed in Selenium 6.")] public string GetAttribute(string attributeName) { string attribute = string.Empty; diff --git a/dotnet/src/webdriver/WebElement.cs b/dotnet/src/webdriver/WebElement.cs index 51cce73e1eb67..b3e4356ca55b1 100644 --- a/dotnet/src/webdriver/WebElement.cs +++ b/dotnet/src/webdriver/WebElement.cs @@ -411,6 +411,7 @@ public virtual ReadOnlyCollection FindElements(string mechanism, st /// via JavaScript. /// /// Thrown when the target element is no longer valid in the document DOM. + [Obsolete("Use GetDomAttribute(string attributeName) or GetDomProperty(string propertyName). GetAttribute(string attributeName) will be removed in Selenium 6.")] public virtual string GetAttribute(string attributeName) { Response commandResponse = null;