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()
64
64
service . LogPath = GetLogLocation ( ) ;
65
65
66
66
driver = new FirefoxDriver ( service ) ;
67
+ driver . Quit ( ) ; // Close the Service log file before reading
67
68
var lines = File . ReadLines ( GetLogLocation ( ) ) ;
68
69
Assert . IsNotNull ( lines . FirstOrDefault ( line => line . Contains ( "geckodriver INFO Listening on" ) ) ) ;
69
70
}
@@ -95,6 +96,7 @@ public void LogsLevel()
95
96
service . LogLevel = FirefoxDriverLogLevel . Debug ;
96
97
97
98
driver = new FirefoxDriver ( service ) ;
99
+ driver . Quit ( ) ; // Close the Service log file before reading
98
100
var lines = File . ReadLines ( GetLogLocation ( ) ) ;
99
101
Assert . IsNotNull ( lines . FirstOrDefault ( line => line . Contains ( "Marionette\t DEBUG" ) ) ) ;
100
102
}
@@ -108,6 +110,7 @@ public void StopsTruncatingLogs()
108
110
service . LogLevel = FirefoxDriverLogLevel . Debug ;
109
111
110
112
driver = new FirefoxDriver ( service ) ;
113
+ driver . Quit ( ) ; // Close the Service log file before reading
111
114
var lines = File . ReadLines ( GetLogLocation ( ) ) ;
112
115
Assert . IsNull ( lines . FirstOrDefault ( line => line . Contains ( " ... " ) ) ) ;
113
116
}
You can’t perform that action at this time.
0 commit comments