Skip to content

Commit a08c142

Browse files
committed
Updating .NET tests to properly reflect current driver behavior
1 parent 95f9a05 commit a08c142

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

dotnet/src/webdriver/Remote/WebDriverWireProtocolCommandInfoRepository.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="WebDriverWireProtocolCommandInfoRepository.cs" company="WebDriver Committers">
1+
// <copyright file="WebDriverWireProtocolCommandInfoRepository.cs" company="WebDriver Committers">
22
// Licensed to the Software Freedom Conservancy (SFC) under one
33
// or more contributor license agreements. See the NOTICE file
44
// distributed with this work for additional information
@@ -100,6 +100,8 @@ protected override void InitializeCommandDictionary()
100100
this.TryAddCommand(DriverCommand.GetWindowPosition, new CommandInfo(CommandInfo.GetCommand, "/session/{sessionId}/window/{windowHandle}/position"));
101101
this.TryAddCommand(DriverCommand.SetWindowPosition, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/window/{windowHandle}/position"));
102102
this.TryAddCommand(DriverCommand.MaximizeWindow, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/window/{windowHandle}/maximize"));
103+
this.TryAddCommand(DriverCommand.MinimizeWindow, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/window/minimize"));
104+
this.TryAddCommand(DriverCommand.FullScreenWindow, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/window/fullscreen"));
103105
this.TryAddCommand(DriverCommand.GetOrientation, new CommandInfo(CommandInfo.GetCommand, "/session/{sessionId}/orientation"));
104106
this.TryAddCommand(DriverCommand.SetOrientation, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/orientation"));
105107
this.TryAddCommand(DriverCommand.DismissAlert, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/dismiss_alert"));

dotnet/test/common/CorrectEventFiringTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ public void ClickOverlappingElements()
387387
}
388388

389389
driver.Url = EnvironmentManager.Instance.UrlBuilder.WhereIs("click_tests/overlapping_elements.html");
390-
Assert.That(() => driver.FindElement(By.Id("under")).Click(), Throws.InstanceOf<WebDriverException>().With.Message.Contains("Other element would receive the click"));
390+
Assert.That(() => driver.FindElement(By.Id("under")).Click(), Throws.InstanceOf<ElementClickInterceptedException>().Or.InstanceOf<InvalidOperationException>().With.Message.Contains("Other element would receive the click"));
391391
}
392392

393393
[Test]

dotnet/test/common/WindowTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace OpenQA.Selenium
66
{
77
[TestFixture]
8-
[IgnoreBrowser(Browser.Chrome, "Not implemented in driver")]
8+
//[IgnoreBrowser(Browser.Chrome, "Not implemented in driver")]
99
public class WindowTest : DriverTestFixture
1010
{
1111
private Size originalWindowSize;
@@ -92,7 +92,7 @@ public void ShouldBeAbleToSetThePositionOfTheCurrentWindow()
9292

9393
[Test]
9494
[IgnoreBrowser(Browser.Edge, "Not implemented in driver")]
95-
[IgnoreBrowser(Browser.Chrome, "Not implemented in driver")]
95+
//[IgnoreBrowser(Browser.Chrome, "Not implemented in driver")]
9696
[IgnoreBrowser(Browser.Firefox, "Not implemented in driver")]
9797
[IgnoreBrowser(Browser.HtmlUnit, "Not implemented in driver")]
9898
[IgnoreBrowser(Browser.Opera, "Not implemented in driver")]

0 commit comments

Comments
 (0)