Skip to content

Commit ba22c43

Browse files
committed
Revert "selected" - there is webdriver spec for selected
This reverts commit 0b13270.
1 parent 0b13270 commit ba22c43

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dotnet/test/common/ElementAttributeTest.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,14 @@ public void ShouldOnlyReturnTheValueOfSelectedForRadioButtonsIfItIsSet()
182182
IWebElement initiallyNotSelected = driver.FindElement(By.Id("peas"));
183183
IWebElement initiallySelected = driver.FindElement(By.Id("cheese_and_peas"));
184184

185-
Assert.That(neverSelected.GetDomProperty("checked"), Is.EqualTo("False"));
186-
Assert.That(initiallyNotSelected.GetDomProperty("checked"), Is.EqualTo("False"));
187-
Assert.That(initiallySelected.GetDomProperty("checked"), Is.EqualTo("True"));
185+
Assert.That(neverSelected.GetAttribute("selected"), Is.Null, "false");
186+
Assert.That(initiallyNotSelected.GetAttribute("selected"), Is.Null, "false");
187+
Assert.That(initiallySelected.GetAttribute("selected"), Is.EqualTo("true"), "true");
188188

189189
initiallyNotSelected.Click();
190-
Assert.That(neverSelected.GetDomProperty("checked"), Is.EqualTo("False"));
191-
Assert.That(initiallyNotSelected.GetDomProperty("checked"), Is.EqualTo("True"));
192-
Assert.That(initiallySelected.GetDomProperty("checked"), Is.EqualTo("False"));
190+
Assert.That(neverSelected.GetAttribute("selected"), Is.Null);
191+
Assert.That(initiallyNotSelected.GetAttribute("selected"), Is.EqualTo("true"));
192+
Assert.That(initiallySelected.GetAttribute("selected"), Is.Null);
193193
}
194194

195195
[Test]
@@ -202,8 +202,8 @@ public void ShouldReturnTheValueOfSelectedForOptionsOnlyIfTheyAreSelected()
202202
IWebElement two = options[1];
203203
Assert.That(one.Selected, Is.True);
204204
Assert.That(two.Selected, Is.False);
205-
Assert.That(one.GetDomProperty("checked"), Is.EqualTo("True"));
206-
Assert.That(two.GetDomProperty("checked"), Is.EqualTo("False"));
205+
Assert.That(one.GetAttribute("selected"), Is.EqualTo("true"));
206+
Assert.That(two.GetAttribute("selected"), Is.Null);
207207
}
208208

209209
[Test]

0 commit comments

Comments
 (0)