File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
examples/dotnet/SeleniumDocs/Browsers Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,13 @@ public void Cleanup()
25
25
{
26
26
File . Delete ( _tempPath ) ;
27
27
}
28
- driver . Quit ( ) ;
28
+ try
29
+ {
30
+ driver . Quit ( ) ;
31
+ }
32
+ catch ( WebDriverException )
33
+ {
34
+ }
29
35
}
30
36
31
37
[ TestMethod ]
@@ -62,6 +68,7 @@ public void LogsToFile()
62
68
service . LogPath = GetLogLocation ( ) ;
63
69
64
70
driver = new FirefoxDriver ( service ) ;
71
+ driver . Quit ( ) ;
65
72
var lines = File . ReadLines ( GetLogLocation ( ) ) ;
66
73
Assert . IsNotNull ( lines . FirstOrDefault ( line => line . Contains ( "geckodriver INFO Listening on" ) ) ) ;
67
74
}
@@ -91,6 +98,7 @@ public void LogsLevel()
91
98
service . LogLevel = FirefoxDriverLogLevel . Debug ;
92
99
93
100
driver = new FirefoxDriver ( service ) ;
101
+ driver . Quit ( ) ;
94
102
var lines = File . ReadLines ( GetLogLocation ( ) ) ;
95
103
Assert . IsNotNull ( lines . FirstOrDefault ( line => line . Contains ( "Marionette\t DEBUG" ) ) ) ;
96
104
}
You can’t perform that action at this time.
0 commit comments