Skip to content

Commit ba85145

Browse files
committed
index
1 parent b5be6f2 commit ba85145

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dotnet/src/support/UI/SelectElement.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public void SelectByIndex(int index)
247247

248248
foreach (IWebElement option in this.Options)
249249
{
250-
if (option.GetAttribute("index") == match)
250+
if (option.GetDomProperty("index") == match)
251251
{
252252
SetSelected(option, true);
253253
return;
@@ -364,7 +364,7 @@ public void DeselectByIndex(int index)
364364
string match = index.ToString(CultureInfo.InvariantCulture);
365365
foreach (IWebElement option in this.Options)
366366
{
367-
if (match == option.GetAttribute("index"))
367+
if (match == option.GetDomProperty("index"))
368368
{
369369
SetSelected(option, false);
370370
return;

dotnet/test/common/ElementAttributeTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void ShouldReturnTheValueOfTheIndexAttrbuteEvenIfItIsMissing()
9393

9494
IWebElement multiSelect = driver.FindElement(By.Id("multi"));
9595
ReadOnlyCollection<IWebElement> options = multiSelect.FindElements(By.TagName("option"));
96-
Assert.That(options[1].GetAttribute("index"), Is.EqualTo("1"));
96+
Assert.That(options[1].GetDomProperty("index"), Is.EqualTo("1"));
9797
}
9898

9999

0 commit comments

Comments
 (0)