Skip to content

Commit

Permalink
Revert "selected" - there is webdriver spec for selected
Browse files Browse the repository at this point in the history
This reverts commit 0b13270.
  • Loading branch information
nvborisenko committed Dec 7, 2024
1 parent 0b13270 commit ba22c43
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dotnet/test/common/ElementAttributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ public void ShouldOnlyReturnTheValueOfSelectedForRadioButtonsIfItIsSet()
IWebElement initiallyNotSelected = driver.FindElement(By.Id("peas"));
IWebElement initiallySelected = driver.FindElement(By.Id("cheese_and_peas"));

Assert.That(neverSelected.GetDomProperty("checked"), Is.EqualTo("False"));
Assert.That(initiallyNotSelected.GetDomProperty("checked"), Is.EqualTo("False"));
Assert.That(initiallySelected.GetDomProperty("checked"), Is.EqualTo("True"));
Assert.That(neverSelected.GetAttribute("selected"), Is.Null, "false");
Assert.That(initiallyNotSelected.GetAttribute("selected"), Is.Null, "false");
Assert.That(initiallySelected.GetAttribute("selected"), Is.EqualTo("true"), "true");

initiallyNotSelected.Click();
Assert.That(neverSelected.GetDomProperty("checked"), Is.EqualTo("False"));
Assert.That(initiallyNotSelected.GetDomProperty("checked"), Is.EqualTo("True"));
Assert.That(initiallySelected.GetDomProperty("checked"), Is.EqualTo("False"));
Assert.That(neverSelected.GetAttribute("selected"), Is.Null);
Assert.That(initiallyNotSelected.GetAttribute("selected"), Is.EqualTo("true"));
Assert.That(initiallySelected.GetAttribute("selected"), Is.Null);
}

[Test]
Expand All @@ -202,8 +202,8 @@ public void ShouldReturnTheValueOfSelectedForOptionsOnlyIfTheyAreSelected()
IWebElement two = options[1];
Assert.That(one.Selected, Is.True);
Assert.That(two.Selected, Is.False);
Assert.That(one.GetDomProperty("checked"), Is.EqualTo("True"));
Assert.That(two.GetDomProperty("checked"), Is.EqualTo("False"));
Assert.That(one.GetAttribute("selected"), Is.EqualTo("true"));
Assert.That(two.GetAttribute("selected"), Is.Null);
}

[Test]
Expand Down

0 comments on commit ba22c43

Please sign in to comment.