Skip to content

Commit 96b97dc

Browse files
committed
Fixing overzealous .NET spec modificiations
1 parent 6b781f3 commit 96b97dc

3 files changed

Lines changed: 30 additions & 4 deletions

File tree

dotnet/src/webdriver/Remote/RemoteTimeouts.cs

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,27 @@ public TimeSpan AsynchronousJavaScript
8080
/// </summary>
8181
public TimeSpan PageLoad
8282
{
83-
get { return this.ExecuteGetTimeout("pageLoad"); }
84-
set { this.ExecuteSetTimeout("pageLoad", value); }
83+
get
84+
{
85+
string timeoutName = "page load";
86+
if (this.driver.IsSpecificationCompliant)
87+
{
88+
timeoutName = "pageLoad";
89+
}
90+
91+
return this.ExecuteGetTimeout(timeoutName);
92+
}
93+
94+
set
95+
{
96+
string timeoutName = "page load";
97+
if (this.driver.IsSpecificationCompliant)
98+
{
99+
timeoutName = "pageLoad";
100+
}
101+
102+
this.ExecuteSetTimeout(timeoutName, value);
103+
}
85104
}
86105

87106
/// <summary>
@@ -131,7 +150,13 @@ public ITimeouts SetScriptTimeout(TimeSpan timeToWait)
131150
[Obsolete("This method will be removed in a future version. Please set the PageLoad property instead.")]
132151
public ITimeouts SetPageLoadTimeout(TimeSpan timeToWait)
133152
{
134-
this.ExecuteSetTimeout("pageLoad", timeToWait);
153+
string timeoutName = "page load";
154+
if (this.driver.IsSpecificationCompliant)
155+
{
156+
timeoutName = "pageLoad";
157+
}
158+
159+
this.ExecuteSetTimeout(timeoutName, timeToWait);
135160
return this;
136161
}
137162

dotnet/src/webdriver/Remote/RemoteWebElement.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@ public override bool Equals(object obj)
901901
}
902902

903903
Dictionary<string, object> parameters = new Dictionary<string, object>();
904+
parameters.Add("id", this.Id);
904905
parameters.Add("other", otherAsElement.Id);
905906

906907
Response response = this.Execute(DriverCommand.ElementEquals, parameters);

dotnet/src/webdriver/Remote/W3CWireProtocolCommandInfoRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected override void InitializeCommandDictionary()
115115
// local-end implementation of WebDriver.
116116
this.TryAddCommand(DriverCommand.GetSessionCapabilities, new CommandInfo(CommandInfo.GetCommand, "/session/{sessionId}"));
117117
this.TryAddCommand(DriverCommand.IsElementDisplayed, new CommandInfo(CommandInfo.GetCommand, "/session/{sessionId}/element/{id}/displayed"));
118-
this.TryAddCommand(DriverCommand.ElementEquals, new CommandInfo(CommandInfo.GetCommand, "/session/{sessionId}/element/{id}/equals"));
118+
this.TryAddCommand(DriverCommand.ElementEquals, new CommandInfo(CommandInfo.GetCommand, "/session/{sessionId}/element/{id}/equals/{other}"));
119119
this.TryAddCommand(DriverCommand.DefineDriverMapping, new CommandInfo(CommandInfo.PostCommand, "/config/drivers"));
120120
this.TryAddCommand(DriverCommand.UploadFile, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/file"));
121121
this.TryAddCommand(DriverCommand.SetAlertCredentials, new CommandInfo(CommandInfo.PostCommand, "/session/{sessionId}/alert/credentials"));

0 commit comments

Comments
 (0)