Skip to content

Commit 7328f50

Browse files
committed
name
1 parent 46b9ed6 commit 7328f50

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

dotnet/test/common/ChildrenFindingTest.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void FindElementById()
113113
IWebElement element = driver.FindElement(By.Name("form2"));
114114

115115
IWebElement child = element.FindElement(By.Id("2"));
116-
Assert.That(child.GetAttribute("name"), Is.EqualTo("selectomatic"));
116+
Assert.That(child.GetDomAttribute("name"), Is.EqualTo("selectomatic"));
117117
}
118118

119119

@@ -177,7 +177,7 @@ public void FindElementByLinkText()
177177
IWebElement element = driver.FindElement(By.Name("div1"));
178178

179179
IWebElement child = element.FindElement(By.LinkText("hello world"));
180-
Assert.That(child.GetAttribute("name"), Is.EqualTo("link1"));
180+
Assert.That(child.GetDomAttribute("name"), Is.EqualTo("link1"));
181181
}
182182

183183

@@ -189,8 +189,8 @@ public void FindElementsByLinkText()
189189
ReadOnlyCollection<IWebElement> elements = element.FindElements(By.LinkText("hello world"));
190190

191191
Assert.That(elements, Has.Exactly(2).Items);
192-
Assert.That(elements[0].GetAttribute("name"), Is.EqualTo("link1"));
193-
Assert.That(elements[1].GetAttribute("name"), Is.EqualTo("link2"));
192+
Assert.That(elements[0].GetDomAttribute("name"), Is.EqualTo("link1"));
193+
Assert.That(elements[1].GetDomAttribute("name"), Is.EqualTo("link2"));
194194
}
195195

196196
[Test]
@@ -246,7 +246,7 @@ public void ShouldFindChildElementsByTagName()
246246

247247
IWebElement element = parent.FindElement(By.TagName("a"));
248248

249-
Assert.That(element.GetAttribute("name"), Is.EqualTo("link1"));
249+
Assert.That(element.GetDomAttribute("name"), Is.EqualTo("link1"));
250250
}
251251

252252

dotnet/test/common/ElementFindingTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public void ShouldBeAbleToFindAnElementThatDoesNotSupportTheNameProperty()
151151
{
152152
driver.Url = nestedPage;
153153
IWebElement element = driver.FindElement(By.Name("div1"));
154-
Assert.That(element.GetAttribute("name"), Is.EqualTo("div1"));
154+
Assert.That(element.GetDomAttribute("name"), Is.EqualTo("div1"));
155155
}
156156

157157
// By.Name negative
@@ -815,7 +815,7 @@ public void ShouldBeAbleToFindAHiddenElementsByName()
815815
{
816816
driver.Url = formsPage;
817817
IWebElement element = driver.FindElement(By.Name("hidden"));
818-
Assert.That(element.GetAttribute("name"), Is.EqualTo("hidden"));
818+
Assert.That(element.GetDomAttribute("name"), Is.EqualTo("hidden"));
819819
}
820820

821821
[Test]

dotnet/test/common/FrameSwitchingTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public void ShouldBeAbleToSwitchToAFrameByItsName()
101101
{
102102
driver.Url = framesetPage;
103103
driver.SwitchTo().Frame("fourth");
104-
Assert.That(driver.FindElement(By.TagName("frame")).GetAttribute("name"), Is.EqualTo("child1"));
104+
Assert.That(driver.FindElement(By.TagName("frame")).GetDomAttribute("name"), Is.EqualTo("child1"));
105105

106106
}
107107

dotnet/test/common/JavascriptEnabledBrowserTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public void IfNoElementHasFocusTheActiveElementIsTheBody()
138138

139139
IWebElement element = driver.SwitchTo().ActiveElement();
140140

141-
Assert.That(element.GetAttribute("name"), Is.EqualTo("body"));
141+
Assert.That(element.GetDomAttribute("name"), Is.EqualTo("body"));
142142
}
143143

144144
[Test]

0 commit comments

Comments
 (0)