@@ -49,6 +49,7 @@ public abstract class ChromiumDriver : WebDriver, ISupportsLogs, IDevTools
49
49
private const string DeleteNetworkConditionsCommand = "deleteNetworkConditions" ;
50
50
private const string SendChromeCommand = "sendChromeCommand" ;
51
51
private const string SendChromeCommandWithResult = "sendChromeCommandWithResult" ;
52
+ private const string LaunchAppCommand = "launchAppCommand" ;
52
53
53
54
private readonly string optionsCapabilityName ;
54
55
private DevToolsSession devToolsSession ;
@@ -81,6 +82,7 @@ public ChromiumDriver(ChromiumDriverService service, ChromiumOptions options, Ti
81
82
this . AddCustomChromeCommand ( DeleteNetworkConditionsCommand , HttpCommandInfo . DeleteCommand , "/session/{sessionId}/chromium/network_conditions" ) ;
82
83
this . AddCustomChromeCommand ( SendChromeCommand , HttpCommandInfo . PostCommand , "/session/{sessionId}/chromium/send_command" ) ;
83
84
this . AddCustomChromeCommand ( SendChromeCommandWithResult , HttpCommandInfo . PostCommand , "/session/{sessionId}/chromium/send_command_and_get_result" ) ;
85
+ this . AddCustomChromeCommand ( LaunchAppCommand , HttpCommandInfo . PostCommand , "/session/{sessionId}/chromium/launch_app" ) ;
84
86
}
85
87
86
88
/// <summary>
@@ -133,6 +135,22 @@ public ChromiumNetworkConditions NetworkConditions
133
135
}
134
136
}
135
137
138
+ /// <summary>
139
+ /// Launches a Chromium based application.
140
+ /// </summary>
141
+ /// <param name="id">ID of the chromium app to launch.</param>
142
+ public void LaunchApp ( string id )
143
+ {
144
+ if ( id == null )
145
+ {
146
+ throw new ArgumentNullException ( "id" , "id must not be null" ) ;
147
+ }
148
+
149
+ Dictionary < string , object > parameters = new Dictionary < string , object > ( ) ;
150
+ parameters [ "id" ] = id ;
151
+ this . Execute ( LaunchAppCommand , parameters ) ;
152
+ }
153
+
136
154
/// <summary>
137
155
/// Executes a custom Chrome Dev Tools Protocol Command.
138
156
/// </summary>
0 commit comments