Skip to content

Commit be1ce37

Browse files
committed
[dotnet] use property instead of atom to get the index of a Select Option
1 parent 86b787c commit be1ce37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
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;

0 commit comments

Comments
 (0)