diff --git a/dotnet/src/webdriver/IWebElement.cs b/dotnet/src/webdriver/IWebElement.cs
index 89261bdd88435..ffe56565fe8f1 100644
--- a/dotnet/src/webdriver/IWebElement.cs
+++ b/dotnet/src/webdriver/IWebElement.cs
@@ -16,6 +16,7 @@
// limitations under the License.
//
+using System;
using System.Drawing;
namespace OpenQA.Selenium
@@ -170,6 +171,7 @@ public interface IWebElement : ISearchContext
///
///
/// 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.")]
string GetAttribute(string attributeName);
///