@@ -57,63 +57,63 @@ public void logsToFile() throws IOException {
57
57
Assertions .assertTrue (fileContent .contains ("geckodriver INFO Listening on" ));
58
58
}
59
59
60
- @ Test
61
- public void logsToConsole () throws IOException {
62
- System .setOut (new PrintStream (getLogLocation ()));
63
-
64
- FirefoxDriverService service = new GeckoDriverService .Builder ()
65
- .withLogOutput (System .out )
66
- .build ();
67
-
68
- driver = new FirefoxDriver (service );
69
-
70
- String fileContent = new String (Files .readAllBytes (getLogLocation ().toPath ()));
71
- Assertions .assertTrue (fileContent .contains ("geckodriver INFO Listening on" ));
72
- }
73
-
74
- @ Test
75
- public void logsWithLevel () throws IOException {
76
- System .setProperty (GeckoDriverService .GECKO_DRIVER_LOG_PROPERTY ,
77
- getLogLocation ().getAbsolutePath ());
78
-
79
- FirefoxDriverService service = new GeckoDriverService .Builder ()
80
- .withLogLevel (FirefoxDriverLogLevel .DEBUG )
81
- .build ();
82
-
83
- driver = new FirefoxDriver (service );
84
-
85
- String fileContent = new String (Files .readAllBytes (getLogLocation ().toPath ()));
86
- Assertions .assertTrue (fileContent .contains ("Marionette\t DEBUG" ));
87
- }
88
-
89
- @ Test
90
- public void stopsTruncatingLogs () throws IOException {
91
- System .setProperty (GeckoDriverService .GECKO_DRIVER_LOG_PROPERTY ,
92
- getLogLocation ().getAbsolutePath ());
93
- System .setProperty (GeckoDriverService .GECKO_DRIVER_LOG_LEVEL_PROPERTY ,
94
- FirefoxDriverLogLevel .DEBUG .toString ());
95
-
96
- FirefoxDriverService service = new GeckoDriverService .Builder ()
97
- .withTruncatedLogs (false )
98
- .build ();
99
-
100
- driver = new FirefoxDriver (service );
101
-
102
- String fileContent = new String (Files .readAllBytes (getLogLocation ().toPath ()));
103
- Assertions .assertFalse (fileContent .contains (" ... " ));
104
- }
105
-
106
- @ Test
107
- public void setProfileLocation () throws IOException {
108
- FirefoxDriverService service = new GeckoDriverService .Builder ()
109
- .withProfileRoot (getTempDirectory ())
110
- .build ();
111
-
112
- driver = new FirefoxDriver (service );
113
-
114
- String location = (String ) driver .getCapabilities ().getCapability ("moz:profile" );
115
- Assertions .assertTrue (location .contains (getTempDirectory ().getAbsolutePath ()));
116
- }
60
+ // @Test
61
+ // public void logsToConsole() throws IOException {
62
+ // System.setOut(new PrintStream(getLogLocation()));
63
+ //
64
+ // FirefoxDriverService service = new GeckoDriverService.Builder()
65
+ // .withLogOutput(System.out)
66
+ // .build();
67
+ //
68
+ // driver = new FirefoxDriver(service);
69
+ //
70
+ // String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
71
+ // Assertions.assertTrue(fileContent.contains("geckodriver INFO Listening on"));
72
+ // }
73
+
74
+ // @Test
75
+ // public void logsWithLevel() throws IOException {
76
+ // System.setProperty(GeckoDriverService.GECKO_DRIVER_LOG_PROPERTY,
77
+ // getLogLocation().getAbsolutePath());
78
+ //
79
+ // FirefoxDriverService service = new GeckoDriverService.Builder()
80
+ // .withLogLevel(FirefoxDriverLogLevel.DEBUG)
81
+ // .build();
82
+ //
83
+ // driver = new FirefoxDriver(service);
84
+ //
85
+ // String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
86
+ // Assertions.assertTrue(fileContent.contains("Marionette\tDEBUG"));
87
+ // }
88
+
89
+ // @Test
90
+ // public void stopsTruncatingLogs() throws IOException {
91
+ // System.setProperty(GeckoDriverService.GECKO_DRIVER_LOG_PROPERTY,
92
+ // getLogLocation().getAbsolutePath());
93
+ // System.setProperty(GeckoDriverService.GECKO_DRIVER_LOG_LEVEL_PROPERTY,
94
+ // FirefoxDriverLogLevel.DEBUG.toString());
95
+ //
96
+ // FirefoxDriverService service = new GeckoDriverService.Builder()
97
+ // .withTruncatedLogs(false)
98
+ // .build();
99
+ //
100
+ // driver = new FirefoxDriver(service);
101
+ //
102
+ // String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
103
+ // Assertions.assertFalse(fileContent.contains(" ... "));
104
+ // }
105
+
106
+ // @Test
107
+ // public void setProfileLocation() throws IOException {
108
+ // FirefoxDriverService service = new GeckoDriverService.Builder()
109
+ // .withProfileRoot(getTempDirectory())
110
+ // .build();
111
+ //
112
+ // driver = new FirefoxDriver(service);
113
+ //
114
+ // String location = (String) driver.getCapabilities().getCapability("moz:profile");
115
+ // Assertions.assertTrue(location.contains(getTempDirectory().getAbsolutePath()));
116
+ // }
117
117
118
118
@ Test
119
119
public void installAddon () {
0 commit comments