diff --git a/dotnet/src/webdriver/Chromium/ChromiumDriver.cs b/dotnet/src/webdriver/Chromium/ChromiumDriver.cs index de483cb492f57..fb2d91b08e9c4 100644 --- a/dotnet/src/webdriver/Chromium/ChromiumDriver.cs +++ b/dotnet/src/webdriver/Chromium/ChromiumDriver.cs @@ -49,6 +49,7 @@ public abstract class ChromiumDriver : WebDriver, ISupportsLogs, IDevTools private const string DeleteNetworkConditionsCommand = "deleteNetworkConditions"; private const string SendChromeCommand = "sendChromeCommand"; private const string SendChromeCommandWithResult = "sendChromeCommandWithResult"; + private const string LaunchAppCommand = "launchAppCommand"; private readonly string optionsCapabilityName; private DevToolsSession devToolsSession; @@ -81,6 +82,7 @@ public ChromiumDriver(ChromiumDriverService service, ChromiumOptions options, Ti this.AddCustomChromeCommand(DeleteNetworkConditionsCommand, HttpCommandInfo.DeleteCommand, "/session/{sessionId}/chromium/network_conditions"); this.AddCustomChromeCommand(SendChromeCommand, HttpCommandInfo.PostCommand, "/session/{sessionId}/chromium/send_command"); this.AddCustomChromeCommand(SendChromeCommandWithResult, HttpCommandInfo.PostCommand, "/session/{sessionId}/chromium/send_command_and_get_result"); + this.AddCustomChromeCommand(LaunchAppCommand, HttpCommandInfo.PostCommand, "/session/{sessionId}/chromium/launch_app"); } /// @@ -133,6 +135,22 @@ public ChromiumNetworkConditions NetworkConditions } } + /// + /// Launches a Chromium based application. + /// + /// ID of the chromium app to launch. + public void LaunchApp(string id) + { + if (id == null) + { + throw new ArgumentNullException("id", "id must not be null"); + } + + Dictionary parameters = new Dictionary(); + parameters["id"] = id; + this.Execute(LaunchAppCommand, parameters); + } + /// /// Executes a custom Chrome Dev Tools Protocol Command. ///