Skip to content

Commit 328705c

Browse files
committed
remove unreachable assertions
1 parent 83ef394 commit 328705c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dotnet/test/common/TargetLocatorTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void ShouldSwitchToFrameByNameAndBackToDefaultContent()
9595

9696
// DefaultContent should not have the element in it.
9797
Assert.That(
98-
() => Assert.AreEqual(driver.FindElement(By.Id("pageNumber")).Text, "1"),
98+
() => driver.FindElement(By.Id("pageNumber")),
9999
Throws.TypeOf<NoSuchElementException>());
100100

101101
driver.SwitchTo().Frame("second");
@@ -105,7 +105,7 @@ public void ShouldSwitchToFrameByNameAndBackToDefaultContent()
105105

106106
// DefaultContent should not have the element in it.
107107
Assert.That(
108-
() => Assert.AreEqual(driver.FindElement(By.Id("pageNumber")).Text, "1"),
108+
() => driver.FindElement(By.Id("pageNumber")),
109109
Throws.TypeOf<NoSuchElementException>());
110110
}
111111

@@ -121,7 +121,7 @@ public void ShouldSwitchToFrameByIndexAndBackToDefaultContent()
121121

122122
// DefaultContent should not have the element in it.
123123
Assert.That(
124-
() => Assert.AreEqual(driver.FindElement(By.Id("pageNumber")).Text, "1"),
124+
() => driver.FindElement(By.Id("pageNumber")),
125125
Throws.TypeOf<NoSuchElementException>());
126126

127127

@@ -132,7 +132,7 @@ public void ShouldSwitchToFrameByIndexAndBackToDefaultContent()
132132

133133
// DefaultContent should not have the element in it.
134134
Assert.That(
135-
() => Assert.AreEqual(driver.FindElement(By.Id("pageNumber")).Text, "1"),
135+
() => driver.FindElement(By.Id("pageNumber")).Text,
136136
Throws.TypeOf<NoSuchElementException>());
137137
}
138138

0 commit comments

Comments
 (0)