Skip to content

Commit 65b5ff3

Browse files
committed
[dotnet] Fixing tests in SelectBrowserTests
Browser behavior had changed, and we did not update the tests.
1 parent 087d2bf commit 65b5ff3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

dotnet/test/support/UI/SelectBrowserTests.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ public void ShouldThrowExceptionOnSelectByTextExactMatchIfOptionDoesNotExist()
181181
}
182182

183183
[Test]
184+
[IgnoreBrowser(Browser.Firefox, "Not working in all bindings.")]
184185
public void ShouldNotAllowInvisibleOptionsToBeSelectedByVisibleText()
185186
{
186187
IWebElement element = driver.FindElement(By.Name("invisi_select"));
@@ -201,7 +202,7 @@ public void ShouldThrowExceptionOnSelectByVisibleTextIfOptionDisabled()
201202
{
202203
IWebElement element = driver.FindElement(By.Name("single_disabled"));
203204
SelectElement elementWrapper = new SelectElement(element);
204-
Assert.Throws<NoSuchElementException>(() => elementWrapper.SelectByText("Disabled"));
205+
Assert.Throws<InvalidOperationException>(() => elementWrapper.SelectByText("Disabled"));
205206
}
206207

207208
[Test]
@@ -227,7 +228,7 @@ public void ShouldThrowExceptionOnSelectByIndexIfOptionDisabled()
227228
{
228229
IWebElement element = driver.FindElement(By.Name("single_disabled"));
229230
SelectElement elementWrapper = new SelectElement(element);
230-
Assert.Throws<NoSuchElementException>(() => elementWrapper.SelectByIndex(1));
231+
Assert.Throws<InvalidOperationException>(() => elementWrapper.SelectByIndex(1));
231232
}
232233

233234
[Test]
@@ -253,7 +254,7 @@ public void ShouldThrowExceptionOnSelectByReturnedValueIfOptionDisabled()
253254
{
254255
IWebElement element = driver.FindElement(By.Name("single_disabled"));
255256
SelectElement elementWrapper = new SelectElement(element);
256-
Assert.Throws<NoSuchElementException>(() => elementWrapper.SelectByValue("disabled"));
257+
Assert.Throws<InvalidOperationException>(() => elementWrapper.SelectByValue("disabled"));
257258
}
258259

259260
[Test]
@@ -287,7 +288,7 @@ public void ShouldAllowUserToDeselectOptionsByVisibleText()
287288
}
288289

289290
[Test]
290-
291+
[IgnoreBrowser(Browser.Firefox, "Not working in all bindings.")]
291292
public void ShouldNotAllowUserToDeselectOptionsByInvisibleText()
292293
{
293294
IWebElement element = driver.FindElement(By.Name("invisi_select"));

0 commit comments

Comments
 (0)