@@ -16,6 +16,7 @@ public void TestOrientation()
16
16
PrintOptions printOptions = new PrintOptions ( ) ;
17
17
printOptions . Orientation = PrintOrientation . Landscape ;
18
18
PrintOrientation currentOrientation = printOptions . Orientation ;
19
+ driver . Quit ( ) ;
19
20
}
20
21
21
22
[ TestMethod ]
@@ -26,7 +27,8 @@ public void TestRange()
26
27
PrintOptions printOptions = new PrintOptions ( ) ;
27
28
printOptions . AddPageRangeToPrint ( "1-3" ) ; // add range of pages
28
29
printOptions . AddPageToPrint ( 5 ) ; // add individual page
29
- }
30
+ driver . Quit ( ) ;
31
+ }
30
32
31
33
[ TestMethod ]
32
34
public void TestSize ( )
@@ -35,6 +37,7 @@ public void TestSize()
35
37
driver . Navigate ( ) . GoToUrl ( "https://www.selenium.dev/" ) ;
36
38
PrintOptions printOptions = new PrintOptions ( ) ;
37
39
PrintOptions . PageSize currentDimensions = printOptions . PageDimensions ;
40
+ driver . Quit ( ) ;
38
41
}
39
42
40
43
[ TestMethod ]
@@ -45,6 +48,7 @@ public void TestBackgrounds()
45
48
PrintOptions printOptions = new PrintOptions ( ) ;
46
49
printOptions . OutputBackgroundImages = true ;
47
50
bool currentBackgrounds = printOptions . OutputBackgroundImages ;
51
+ driver . Quit ( ) ;
48
52
}
49
53
50
54
[ TestMethod ]
@@ -54,6 +58,7 @@ public void TestMargins()
54
58
driver . Navigate ( ) . GoToUrl ( "https://www.selenium.dev/" ) ;
55
59
PrintOptions printOptions = new PrintOptions ( ) ;
56
60
PrintOptions . Margins currentMargins = printOptions . PageMargins ;
61
+ driver . Quit ( ) ;
57
62
}
58
63
59
64
@@ -65,6 +70,7 @@ public void TestScale()
65
70
PrintOptions printOptions = new PrintOptions ( ) ;
66
71
printOptions . ScaleFactor = 0.5 ;
67
72
double currentScale = printOptions . ScaleFactor ;
73
+ driver . Quit ( ) ;
68
74
}
69
75
70
76
[ TestMethod ]
@@ -75,16 +81,18 @@ public void TestShrinkToFit()
75
81
PrintOptions printOptions = new PrintOptions ( ) ;
76
82
printOptions . ShrinkToFit = true ;
77
83
bool currentShrinkToFit = printOptions . ShrinkToFit ;
84
+ driver . Quit ( ) ;
78
85
}
79
86
80
87
[ TestMethod ]
81
- public void PrintWithPrintsPageTest ( )
88
+ public void PrintWithPrintsPageTest ( )
82
89
{
83
90
WebDriver driver = new ChromeDriver ( ) ;
84
91
driver . Navigate ( ) . GoToUrl ( "https://www.selenium.dev/" ) ;
85
92
PrintOptions printOptions = new PrintOptions ( ) ;
86
93
PrintDocument printedPage = driver . Print ( printOptions ) ;
87
94
Assert . IsTrue ( printedPage . AsBase64EncodedString . StartsWith ( "JVBER" ) ) ;
95
+ driver . Quit ( ) ;
88
96
}
89
97
}
90
- }
98
+ }
0 commit comments