[dotnet] Added Deprecation to WebElement.GetAttribute() per #13334#14676
[dotnet] Added Deprecation to WebElement.GetAttribute() per #13334#14676nvborisenko merged 10 commits intoSeleniumHQ:trunkfrom
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the PR. |
driver.Url = "https://nuget.org";
var input = driver.FindElement(By.Id("search"));
input.SendKeys("abc");
var val = input.GetAttribute("value");
var val2 = input.GetDomAttribute("value");
var val3 = input.GetDomProperty("value");
Console.WriteLine(val); // "abc"
Console.WriteLine(val2); // ""
Console.WriteLine(val3); // abc |
good catch, I forgot to add GetDomProperty() to the deprecation note |
|
We have to double check which one is correct: |
According to @titusfortner in #13334
|
|
All right, Since it is breaking change of core (most used interface) functionality, let's add info when it will be completely removed. In v5 or in v6? It should be definitely major selenium version, but which one... Usually we remove deprecated methods in 2 minor releases, but this another case, this would be real pain for all users. So major release should be considered. But if v5 will be released in 2 months, then it is not enough time range - then v6 is preferable. |
|
I agree that major releases should be considered. Since v5 is too soon, I'll put v6 in. Worst case we make a change later and make it v7. |
|
@shbenzer please do not merge! Kind of code-freeze after release. Keep it open for a while. |
|
@shbenzer please check failing CI build, easy to fix. |
|
seemed to be missing the system import as well |
User description
Description
Added Deprecation to WebElement.GetAttribute() per #13334
Motivation and Context
#13334
Types of changes
Checklist
PR Type
enhancement
Description
GetAttributemethod in theIWebElementinterface.GetDomAttributemethod as an alternative.PRDescriptionHeader.CHANGES_WALKTHROUGH
IWebElement.cs
Deprecate `GetAttribute` method in `IWebElement` interfacedotnet/src/webdriver/IWebElement.cs
Obsoleteattribute to theGetAttributemethod.GetDomAttribute.