Skip to content

Commit 2cbf21f

Browse files
committed
remove java stuff that doesn't work in 4.7
1 parent 6455fdb commit 2cbf21f

File tree

3 files changed

+83
-227
lines changed

3 files changed

+83
-227
lines changed

examples/java/src/test/java/dev/selenium/bidirectional/browsingcontext/BrowsingContextTest.java

Lines changed: 0 additions & 144 deletions
This file was deleted.

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

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import java.io.File;
1414
import java.nio.file.Path;
1515
import java.nio.file.Paths;
16-
import org.openqa.selenium.chromium.ChromiumDriverLogLevel;
16+
//import org.openqa.selenium.chromium.ChromiumDriverLogLevel;
1717

1818
import java.io.File;
1919
import java.io.IOException;
@@ -80,57 +80,57 @@ public void logsToFile() throws IOException {
8080
// Assertions.assertTrue(fileContent.contains("Starting ChromeDriver"));
8181
// }
8282

83-
@Test
84-
public void logsWithLevel() throws IOException {
85-
System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_PROPERTY,
86-
getLogLocation().getAbsolutePath());
87-
88-
ChromeDriverService service = new ChromeDriverService.Builder()
89-
.withLogLevel(ChromiumDriverLogLevel.DEBUG)
90-
.build();
91-
92-
driver = new ChromeDriver(service);
93-
94-
String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
95-
Assertions.assertTrue(fileContent.contains("[DEBUG]:"));
96-
}
97-
98-
@Test
99-
public void configureDriverLogs() throws IOException {
100-
System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_PROPERTY,
101-
getLogLocation().getAbsolutePath());
102-
System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_LEVEL_PROPERTY,
103-
ChromiumDriverLogLevel.DEBUG.toString());
104-
105-
ChromeDriverService service = new ChromeDriverService.Builder()
106-
.withAppendLog(true)
107-
.withReadableTimestamp(true)
108-
.build();
109-
110-
driver = new ChromeDriver(service);
111-
112-
String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
113-
Pattern pattern = Pattern.compile("\\[\\d\\d-\\d\\d-\\d\\d\\d\\d", Pattern.CASE_INSENSITIVE);
114-
Assertions.assertTrue(pattern.matcher(fileContent).find());
115-
}
116-
117-
@Test
118-
public void disableBuildChecks() throws IOException {
119-
System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_PROPERTY,
120-
getLogLocation().getAbsolutePath());
121-
System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_LEVEL_PROPERTY,
122-
ChromiumDriverLogLevel.WARNING.toString());
123-
124-
ChromeDriverService service = new ChromeDriverService.Builder()
125-
.withBuildCheckDisabled(true)
126-
.build();
83+
// @Test
84+
// public void logsWithLevel() throws IOException {
85+
// System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_PROPERTY,
86+
// getLogLocation().getAbsolutePath());
87+
//
88+
// ChromeDriverService service = new ChromeDriverService.Builder()
89+
// .withLogLevel(ChromiumDriverLogLevel.DEBUG)
90+
// .build();
91+
//
92+
// driver = new ChromeDriver(service);
93+
//
94+
// String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
95+
// Assertions.assertTrue(fileContent.contains("[DEBUG]:"));
96+
// }
12797

128-
driver = new ChromeDriver(service);
98+
// @Test
99+
// public void configureDriverLogs() throws IOException {
100+
// System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_PROPERTY,
101+
// getLogLocation().getAbsolutePath());
102+
// System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_LEVEL_PROPERTY,
103+
// ChromiumDriverLogLevel.DEBUG.toString());
104+
//
105+
// ChromeDriverService service = new ChromeDriverService.Builder()
106+
// .withAppendLog(true)
107+
// .withReadableTimestamp(true)
108+
// .build();
109+
//
110+
// driver = new ChromeDriver(service);
111+
//
112+
// String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
113+
// Pattern pattern = Pattern.compile("\\[\\d\\d-\\d\\d-\\d\\d\\d\\d", Pattern.CASE_INSENSITIVE);
114+
// Assertions.assertTrue(pattern.matcher(fileContent).find());
115+
// }
129116

130-
String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
131-
String expected = "[WARNING]: You are using an unsupported command-line switch: --disable-build-check";
132-
Assertions.assertTrue(fileContent.contains(expected));
133-
}
117+
// @Test
118+
// public void disableBuildChecks() throws IOException {
119+
// System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_PROPERTY,
120+
// getLogLocation().getAbsolutePath());
121+
// System.setProperty(ChromeDriverService.CHROME_DRIVER_LOG_LEVEL_PROPERTY,
122+
// ChromiumDriverLogLevel.WARNING.toString());
123+
//
124+
// ChromeDriverService service = new ChromeDriverService.Builder()
125+
// .withBuildCheckDisabled(true)
126+
// .build();
127+
//
128+
// driver = new ChromeDriver(service);
129+
//
130+
// String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
131+
// String expected = "[WARNING]: You are using an unsupported command-line switch: --disable-build-check";
132+
// Assertions.assertTrue(fileContent.contains(expected));
133+
// }
134134

135135
@Test
136136
public void extensionOptions() {

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

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.junit.jupiter.api.AfterEach;
55
import org.junit.jupiter.api.Assertions;
66
import org.junit.jupiter.api.Test;
7-
import org.openqa.selenium.chromium.ChromiumDriverLogLevel;
7+
//import org.openqa.selenium.chromium.ChromiumDriverLogLevel;
88
import org.openqa.selenium.edge.EdgeDriver;
99
import org.openqa.selenium.edge.EdgeDriverService;
1010
import org.openqa.selenium.edge.EdgeOptions;
@@ -75,39 +75,39 @@ public void excludeSwitches() {
7575
// Assertions.assertTrue(fileContent.contains("Starting Microsoft Edge WebDriver"));
7676
// }
7777

78-
@Test
79-
public void logsWithLevel() throws IOException {
80-
System.setProperty(EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY,
81-
getLogLocation().getAbsolutePath());
82-
83-
EdgeDriverService service = new EdgeDriverService.Builder()
84-
.withLoglevel(ChromiumDriverLogLevel.DEBUG)
85-
.build();
86-
87-
driver = new EdgeDriver(service);
88-
89-
String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
90-
Assertions.assertTrue(fileContent.contains("[DEBUG]:"));
91-
}
92-
93-
@Test
94-
public void configureDriverLogs() throws IOException {
95-
System.setProperty(EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY,
96-
getLogLocation().getAbsolutePath());
97-
System.setProperty(EdgeDriverService.EDGE_DRIVER_LOG_LEVEL_PROPERTY,
98-
ChromiumDriverLogLevel.DEBUG.toString());
99-
100-
EdgeDriverService service = new EdgeDriverService.Builder()
101-
.withAppendLog(true)
102-
.withReadableTimestamp(true)
103-
.build();
104-
105-
driver = new EdgeDriver(service);
78+
// @Test
79+
// public void logsWithLevel() throws IOException {
80+
// System.setProperty(EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY,
81+
// getLogLocation().getAbsolutePath());
82+
//
83+
// EdgeDriverService service = new EdgeDriverService.Builder()
84+
// .withLoglevel(ChromiumDriverLogLevel.DEBUG)
85+
// .build();
86+
//
87+
// driver = new EdgeDriver(service);
88+
//
89+
// String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
90+
// Assertions.assertTrue(fileContent.contains("[DEBUG]:"));
91+
// }
10692

107-
String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
108-
Pattern pattern = Pattern.compile("\\[\\d\\d-\\d\\d-\\d\\d\\d\\d", Pattern.CASE_INSENSITIVE);
109-
Assertions.assertTrue(pattern.matcher(fileContent).find());
110-
}
93+
// @Test
94+
// public void configureDriverLogs() throws IOException {
95+
// System.setProperty(EdgeDriverService.EDGE_DRIVER_LOG_PROPERTY,
96+
// getLogLocation().getAbsolutePath());
97+
// System.setProperty(EdgeDriverService.EDGE_DRIVER_LOG_LEVEL_PROPERTY,
98+
// ChromiumDriverLogLevel.DEBUG.toString());
99+
//
100+
// EdgeDriverService service = new EdgeDriverService.Builder()
101+
// .withAppendLog(true)
102+
// .withReadableTimestamp(true)
103+
// .build();
104+
//
105+
// driver = new EdgeDriver(service);
106+
//
107+
// String fileContent = new String(Files.readAllBytes(getLogLocation().toPath()));
108+
// Pattern pattern = Pattern.compile("\\[\\d\\d-\\d\\d-\\d\\d\\d\\d", Pattern.CASE_INSENSITIVE);
109+
// Assertions.assertTrue(pattern.matcher(fileContent).find());
110+
// }
111111

112112
@Test
113113
public void disableBuildChecks() throws IOException {

0 commit comments

Comments
 (0)