Skip to content

Commit f096422

Browse files
committed
[dotnet] Return back protected synchronous Execute method in WebDriver
1 parent 425ed87 commit f096422

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

Diff for: dotnet/src/webdriver/Remote/HttpCommandExecutor.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ public bool TryAddCommand(string commandName, CommandInfo info)
153153
}
154154

155155
/// <summary>
156-
/// Executes a command
156+
/// Executes a command.
157157
/// </summary>
158-
/// <param name="commandToExecute">The command you wish to execute</param>
159-
/// <returns>A response from the browser</returns>
158+
/// <param name="commandToExecute">The command you wish to execute.</param>
159+
/// <returns>A response from the browser.</returns>
160160
public virtual Response Execute(Command commandToExecute)
161161
{
162162
return Task.Run(() => this.ExecuteAsync(commandToExecute)).GetAwaiter().GetResult();
@@ -165,8 +165,8 @@ public virtual Response Execute(Command commandToExecute)
165165
/// <summary>
166166
/// Executes a command as an asynchronous task.
167167
/// </summary>
168-
/// <param name="commandToExecute">The command you wish to execute</param>
169-
/// <returns>A task object representing the asynchronous operation</returns>
168+
/// <param name="commandToExecute">The command you wish to execute.</param>
169+
/// <returns>A task object representing the asynchronous operation.</returns>
170170
public virtual async Task<Response> ExecuteAsync(Command commandToExecute)
171171
{
172172
if (commandToExecute == null)

Diff for: dotnet/src/webdriver/WebDriver.cs

+8-2
Original file line numberDiff line numberDiff line change
@@ -572,14 +572,20 @@ internal Task<Response> InternalExecuteAsync(string driverCommandToExecute,
572572
return this.ExecuteAsync(driverCommandToExecute, parameters);
573573
}
574574

575-
internal Response Execute(string driverCommandToExecute,
575+
/// <summary>
576+
/// Executes a command with this driver.
577+
/// </summary>
578+
/// <param name="driverCommandToExecute">A <see cref="DriverCommand"/> value representing the command to execute.</param>
579+
/// <param name="parameters">A <see cref="Dictionary{K, V}"/> containing the names and values of the parameters of the command.</param>
580+
/// <returns>A <see cref="Response"/> containing information about the success or failure of the command and any data returned by the command.</returns>
581+
protected virtual Response Execute(string driverCommandToExecute,
576582
Dictionary<string, object> parameters)
577583
{
578584
return Task.Run(() => this.ExecuteAsync(driverCommandToExecute, parameters)).GetAwaiter().GetResult();
579585
}
580586

581587
/// <summary>
582-
/// Executes a command with this driver .
588+
/// Executes a command with this driver.
583589
/// </summary>
584590
/// <param name="driverCommandToExecute">A <see cref="DriverCommand"/> value representing the command to execute.</param>
585591
/// <param name="parameters">A <see cref="Dictionary{K, V}"/> containing the names and values of the parameters of the command.</param>

0 commit comments

Comments
 (0)