File tree Expand file tree Collapse file tree
examples/dotnet/SeleniumDocs/Browsers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,13 @@ public void Cleanup()
2525 {
2626 File . Delete ( _tempPath ) ;
2727 }
28- driver . Quit ( ) ;
28+ try
29+ {
30+ driver . Quit ( ) ;
31+ }
32+ catch ( WebDriverException )
33+ {
34+ }
2935 }
3036
3137 [ TestMethod ]
@@ -62,6 +68,7 @@ public void LogsToFile()
6268 service . LogPath = GetLogLocation ( ) ;
6369
6470 driver = new FirefoxDriver ( service ) ;
71+ driver . Quit ( ) ;
6572 var lines = File . ReadLines ( GetLogLocation ( ) ) ;
6673 Assert . IsNotNull ( lines . FirstOrDefault ( line => line . Contains ( "geckodriver INFO Listening on" ) ) ) ;
6774 }
@@ -91,6 +98,7 @@ public void LogsLevel()
9198 service . LogLevel = FirefoxDriverLogLevel . Debug ;
9299
93100 driver = new FirefoxDriver ( service ) ;
101+ driver . Quit ( ) ;
94102 var lines = File . ReadLines ( GetLogLocation ( ) ) ;
95103 Assert . IsNotNull ( lines . FirstOrDefault ( line => line . Contains ( "Marionette\t DEBUG" ) ) ) ;
96104 }
You can’t perform that action at this time.
0 commit comments