File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed
dotnet/src/webdriver/Chromium Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -287,11 +287,30 @@ public void CloseDevToolsSession()
287
287
/// <summary>
288
288
/// Returns the list of cast sinks (Cast devices) available to the Chrome media router.
289
289
/// </summary>
290
- /// <returns>An object representing the list of available sinks.</returns>
291
- public object GetCastSinks ( )
290
+ /// <returns>The list of available sinks.</returns>
291
+ public List < Dictionary < string , string > > GetCastSinks ( )
292
292
{
293
+ List < Dictionary < string , string > > returnValue = new List < Dictionary < string , string > > ( ) ;
293
294
Response response = this . Execute ( GetCastSinksCommand , null ) ;
294
- return response . Value ;
295
+ object [ ] responseValue = response . Value as object [ ] ;
296
+ if ( responseValue != null )
297
+ {
298
+ foreach ( object entry in responseValue )
299
+ {
300
+ Dictionary < string , object > entryValue = entry as Dictionary < string , object > ;
301
+ if ( entryValue != null )
302
+ {
303
+ Dictionary < string , string > sink = new Dictionary < string , string > ( ) ;
304
+ foreach ( KeyValuePair < string , object > pair in entryValue )
305
+ {
306
+ sink [ pair . Key ] = pair . Value . ToString ( ) ;
307
+ }
308
+
309
+ returnValue . Add ( sink ) ;
310
+ }
311
+ }
312
+ }
313
+ return returnValue ;
295
314
}
296
315
297
316
/// <summary>
You can’t perform that action at this time.
0 commit comments