File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1919
2020using System . Collections . Generic ;
2121
22+ #nullable enable
23+
2224namespace OpenQA . Selenium
2325{
2426 /// <summary>
Original file line number Diff line number Diff line change @@ -530,15 +530,16 @@ public IReadOnlyList<string> GetDownloadableFiles()
530530 throw new WebDriverException ( "GetDownloadableFiles returned successfully, but response content was not an object: " + commandResponse . Value ) ;
531531 }
532532
533- object [ ] namesArray = ( object [ ] ) value [ "names" ] ! ;
534- return namesArray . Select ( obj => obj . ToString ( ) ! ) . ToList ( ) ;
533+ object ? [ ] namesArray = ( object ? [ ] ) value [ "names" ] ! ;
534+ return namesArray . Select ( obj => obj ! . ToString ( ) ! ) . ToList ( ) ;
535535 }
536536
537537 /// <summary>
538538 /// Downloads a file with the specified file name.
539539 /// </summary>
540540 /// <param name="fileName">The name of the file to be downloaded.</param>
541541 /// <param name="targetDirectory">The target directory where the file should be downloaded to.</param>
542+ /// <exception cref="ArgumentNullException">If <paramref name="targetDirectory"/> is null.</exception>
542543 public void DownloadFile ( string fileName , string targetDirectory )
543544 {
544545 var enableDownloads = this . Capabilities . GetCapability ( CapabilityType . EnableDownloads ) ;
You can’t perform that action at this time.
0 commit comments