Skip to content

Commit 59adbba

Browse files
committed
multiple
1 parent 3cdb358 commit 59adbba

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

dotnet/src/support/UI/SelectElement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public SelectElement(IWebElement element)
5454
this.element = element;
5555

5656
// let check if it's a multiple
57-
string attribute = element.GetAttribute("multiple");
57+
string attribute = element.GetDomAttribute("multiple");
5858
this.IsMultiple = attribute != null && attribute.ToLowerInvariant() != "false";
5959
}
6060

dotnet/test/common/ElementAttributeTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,39 +389,39 @@ public void MultipleAttributeShouldBeNullWhenNotSet()
389389
{
390390
driver.Url = selectPage;
391391
IWebElement element = driver.FindElement(By.Id("selectWithoutMultiple"));
392-
Assert.That(element.GetAttribute("multiple"), Is.Null);
392+
Assert.That(element.GetDomAttribute("multiple"), Is.Null);
393393
}
394394

395395
[Test]
396396
public void MultipleAttributeShouldBeTrueWhenSet()
397397
{
398398
driver.Url = selectPage;
399399
IWebElement element = driver.FindElement(By.Id("selectWithMultipleEqualsMultiple"));
400-
Assert.That(element.GetAttribute("multiple"), Is.EqualTo("true"));
400+
Assert.That(element.GetDomAttribute("multiple"), Is.EqualTo("true"));
401401
}
402402

403403
[Test]
404404
public void MultipleAttributeShouldBeTrueWhenSelectHasMultipleWithValueAsBlank()
405405
{
406406
driver.Url = selectPage;
407407
IWebElement element = driver.FindElement(By.Id("selectWithEmptyStringMultiple"));
408-
Assert.That(element.GetAttribute("multiple"), Is.EqualTo("true"));
408+
Assert.That(element.GetDomAttribute("multiple"), Is.EqualTo("true"));
409409
}
410410

411411
[Test]
412412
public void MultipleAttributeShouldBeTrueWhenSelectHasMultipleWithoutAValue()
413413
{
414414
driver.Url = selectPage;
415415
IWebElement element = driver.FindElement(By.Id("selectWithMultipleWithoutValue"));
416-
Assert.That(element.GetAttribute("multiple"), Is.EqualTo("true"));
416+
Assert.That(element.GetDomAttribute("multiple"), Is.EqualTo("true"));
417417
}
418418

419419
[Test]
420420
public void MultipleAttributeShouldBeTrueWhenSelectHasMultipleWithValueAsSomethingElse()
421421
{
422422
driver.Url = selectPage;
423423
IWebElement element = driver.FindElement(By.Id("selectWithRandomMultipleValue"));
424-
Assert.That(element.GetAttribute("multiple"), Is.EqualTo("true"));
424+
Assert.That(element.GetDomAttribute("multiple"), Is.EqualTo("true"));
425425
}
426426

427427
[Test]

dotnet/test/common/GetMultipleAttributeTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,39 +29,39 @@ public void MultipleAttributeShouldBeNullWhenNotSet()
2929
{
3030
driver.Url = selectPage;
3131
IWebElement element = driver.FindElement(By.Id("selectWithoutMultiple"));
32-
Assert.That(element.GetAttribute("multiple"), Is.Null);
32+
Assert.That(element.GetDomAttribute("multiple"), Is.Null);
3333
}
3434

3535
[Test]
3636
public void MultipleAttributeShouldBeTrueWhenSet()
3737
{
3838
driver.Url = selectPage;
3939
IWebElement element = driver.FindElement(By.Id("selectWithMultipleEqualsMultiple"));
40-
Assert.That(element.GetAttribute("multiple"), Is.EqualTo("true"));
40+
Assert.That(element.GetDomAttribute("multiple"), Is.EqualTo("true"));
4141
}
4242

4343
[Test]
4444
public void MultipleAttributeShouldBeTrueWhenSelectHasMutilpeWithValueAsBlank()
4545
{
4646
driver.Url = selectPage;
4747
IWebElement element = driver.FindElement(By.Id("selectWithEmptyStringMultiple"));
48-
Assert.That(element.GetAttribute("multiple"), Is.EqualTo("true"));
48+
Assert.That(element.GetDomAttribute("multiple"), Is.EqualTo("true"));
4949
}
5050

5151
[Test]
5252
public void MultipleAttributeShouldBeTrueWhenSelectHasMutilpeWithoutAValue()
5353
{
5454
driver.Url = selectPage;
5555
IWebElement element = driver.FindElement(By.Id("selectWithMultipleWithoutValue"));
56-
Assert.That(element.GetAttribute("multiple"), Is.EqualTo("true"));
56+
Assert.That(element.GetDomAttribute("multiple"), Is.EqualTo("true"));
5757
}
5858

5959
[Test]
6060
public void MultipleAttributeShouldBeTrueWhenSelectHasMutilpeWithValueAsSomethingElse()
6161
{
6262
driver.Url = selectPage;
6363
IWebElement element = driver.FindElement(By.Id("selectWithRandomMultipleValue"));
64-
Assert.That(element.GetAttribute("multiple"), Is.EqualTo("true"));
64+
Assert.That(element.GetDomAttribute("multiple"), Is.EqualTo("true"));
6565
}
6666
}
6767
}

0 commit comments

Comments
 (0)