File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
examples/dotnet/SeleniumDocs/Browsers Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ public void LogsToFile()
6464 service . LogPath = GetLogLocation ( ) ;
6565
6666 driver = new FirefoxDriver ( service ) ;
67+ driver . Quit ( ) ; // Close the Service log file before reading
6768 var lines = File . ReadLines ( GetLogLocation ( ) ) ;
6869 Assert . IsNotNull ( lines . FirstOrDefault ( line => line . Contains ( "geckodriver INFO Listening on" ) ) ) ;
6970 }
@@ -95,6 +96,7 @@ public void LogsLevel()
9596 service . LogLevel = FirefoxDriverLogLevel . Debug ;
9697
9798 driver = new FirefoxDriver ( service ) ;
99+ driver . Quit ( ) ; // Close the Service log file before reading
98100 var lines = File . ReadLines ( GetLogLocation ( ) ) ;
99101 Assert . IsNotNull ( lines . FirstOrDefault ( line => line . Contains ( "Marionette\t DEBUG" ) ) ) ;
100102 }
@@ -108,6 +110,7 @@ public void StopsTruncatingLogs()
108110 service . LogLevel = FirefoxDriverLogLevel . Debug ;
109111
110112 driver = new FirefoxDriver ( service ) ;
113+ driver . Quit ( ) ; // Close the Service log file before reading
111114 var lines = File . ReadLines ( GetLogLocation ( ) ) ;
112115 Assert . IsNull ( lines . FirstOrDefault ( line => line . Contains ( " ... " ) ) ) ;
113116 }
You can’t perform that action at this time.
0 commit comments