Skip to content

Commit 1008110

Browse files
committed
comment out Java things not supported in 4.9
1 parent 68dc7af commit 1008110

File tree

5 files changed

+104
-104
lines changed

5 files changed

+104
-104
lines changed

examples/java/src/test/java/dev/selenium/browsers/ChromeTest.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,19 @@ public void logsToFile() throws IOException {
6666
Assertions.assertTrue(fileContent.contains("Starting ChromeDriver"));
6767
}
6868

69-
@Test
70-
public void logsToConsole() throws IOException {
71-
System.setOut(new PrintStream(getLogLocation()));
72-
73-
ChromeDriverService service = new ChromeDriverService.Builder()
74-
.withLogOutput(System.out)
75-
.build();
76-
77-
driver = new ChromeDriver(service);
78-
79-
String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
80-
Assertions.assertTrue(fileContent.contains("Starting ChromeDriver"));
81-
}
69+
// @Test
70+
// public void logsToConsole() throws IOException {
71+
// System.setOut(new PrintStream(getLogLocation()));
72+
//
73+
// ChromeDriverService service = new ChromeDriverService.Builder()
74+
// .withLogOutput(System.out)
75+
// .build();
76+
//
77+
// driver = new ChromeDriver(service);
78+
//
79+
// String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
80+
// Assertions.assertTrue(fileContent.contains("Starting ChromeDriver"));
81+
// }
8282

8383
@Test
8484
public void logsWithLevel() throws IOException {

examples/java/src/test/java/dev/selenium/browsers/EdgeTest.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,19 @@ public void logsToFile() throws IOException {
6161
Assertions.assertTrue(fileContent.contains("Starting Microsoft Edge WebDriver"));
6262
}
6363

64-
@Test
65-
public void logsToConsole() throws IOException {
66-
System.setOut(new PrintStream(getLogLocation()));
67-
68-
EdgeDriverService service = new EdgeDriverService.Builder()
69-
.withLogOutput(System.out)
70-
.build();
71-
72-
driver = new EdgeDriver(service);
73-
74-
String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
75-
Assertions.assertTrue(fileContent.contains("Starting Microsoft Edge WebDriver"));
76-
}
64+
// @Test
65+
// public void logsToConsole() throws IOException {
66+
// System.setOut(new PrintStream(getLogLocation()));
67+
//
68+
// EdgeDriverService service = new EdgeDriverService.Builder()
69+
// .withLogOutput(System.out)
70+
// .build();
71+
//
72+
// driver = new EdgeDriver(service);
73+
//
74+
// String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
75+
// Assertions.assertTrue(fileContent.contains("Starting Microsoft Edge WebDriver"));
76+
// }
7777

7878
@Test
7979
public void logsWithLevel() throws IOException {

examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -57,63 +57,63 @@ public void logsToFile() throws IOException {
5757
Assertions.assertTrue(fileContent.contains("geckodriver INFO Listening on"));
5858
}
5959

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-
}
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+
// }
117117

118118
@Test
119119
public void installAddon() {

examples/java/src/test/java/dev/selenium/browsers/InternetExplorerTest.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@ public void logsToFile() throws IOException {
5959
Assertions.assertTrue(fileContent.contains("Started InternetExplorerDriver server"));
6060
}
6161

62-
@Test
63-
public void logsToConsole() throws IOException {
64-
System.setOut(new PrintStream(getLogLocation()));
65-
66-
InternetExplorerDriverService service = new InternetExplorerDriverService.Builder()
67-
.withLogOutput(System.out)
68-
.build();
69-
70-
driver = new InternetExplorerDriver(service);
71-
72-
String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
73-
Assertions.assertTrue(fileContent.contains("Started InternetExplorerDriver server"));
74-
}
62+
// @Test
63+
// public void logsToConsole() throws IOException {
64+
// System.setOut(new PrintStream(getLogLocation()));
65+
//
66+
// InternetExplorerDriverService service = new InternetExplorerDriverService.Builder()
67+
// .withLogOutput(System.out)
68+
// .build();
69+
//
70+
// driver = new InternetExplorerDriver(service);
71+
//
72+
// String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
73+
// Assertions.assertTrue(fileContent.contains("Started InternetExplorerDriver server"));
74+
// }
7575

7676
@Test
7777
public void logsWithLevel() throws IOException {

examples/java/src/test/java/dev/selenium/browsers/SafariTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public void basicOptions() {
2525
driver = new SafariDriver(options);
2626
}
2727

28-
@Test
29-
public void enableLogs() {
30-
SafariDriverService service = new SafariDriverService.Builder()
31-
.withLogging(true)
32-
.build();
33-
34-
driver = new SafariDriver(service);
35-
}
28+
// @Test
29+
// public void enableLogs() {
30+
// SafariDriverService service = new SafariDriverService.Builder()
31+
// .withLogging(true)
32+
// .build();
33+
//
34+
// driver = new SafariDriver(service);
35+
// }
3636
}

0 commit comments

Comments
 (0)