File tree 5 files changed +13
-10
lines changed
main/java/io/github/bonigarcia/wdm
test/java/io/github/bonigarcia/wdm/test/watcher
5 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,6 @@ public abstract class WebDriverManager {
170
170
protected static final String CLI_RESOLVER = "resolveDriverFor" ;
171
171
protected static final String CLI_DOCKER = "runInDocker" ;
172
172
protected static final String BROWSER_WATCHER_ID = "kbnnckbeejhjlljpgelfponodpecfapp" ;
173
- protected static final String BROWSER_WATCHER_ERROR = "This feature is not available in BrowserWatcher " ;
174
173
175
174
protected abstract List <URL > getDriverUrls (String driverVersion )
176
175
throws IOException ;
@@ -609,7 +608,8 @@ public WebDriverManager disableCsp() {
609
608
610
609
protected void checkBrowserWatcherVersion () {
611
610
if (getDriverManagerType () != FIREFOX ) {
612
- log .warn (BROWSER_WATCHER_ERROR + getBrowserWatcherVersion ());
611
+ log .warn ("This feature is not available in BrowserWatcher {}" ,
612
+ getBrowserWatcherVersion ());
613
613
}
614
614
}
615
615
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ public class Recording {
32
32
private static final String SEPARATOR = "_" ;
33
33
private static final String DATE_FORMAT = "yyyy.MM.dd_HH.mm.ss.SSS" ;
34
34
35
+ private Recording () {
36
+ throw new IllegalStateException ("Utility class" );
37
+ }
38
+
35
39
public static String getRecordingName (String browserName ,
36
40
String sessionId ) {
37
41
Date now = new Date ();
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ public class WebDriverBrowser {
51
51
52
52
final Logger log = getLogger (lookup ().lookupClass ());
53
53
54
- final String DEFAULT_DOWNLOADS_FOLDER = "Downloads" ;
55
- final String LINUX_ENV_DOWNLOAD_DIR = "XDG_DOWNLOAD_DIR" ;
56
- final String USER_HOME_PROPERTY = "user.home" ;
54
+ static final String DEFAULT_DOWNLOADS_FOLDER = "Downloads" ;
55
+ static final String LINUX_ENV_DOWNLOAD_DIR = "XDG_DOWNLOAD_DIR" ;
56
+ static final String USER_HOME_PROPERTY = "user.home" ;
57
57
static final int RECORDING_TIMEOUT_SEC = 5 ;
58
58
static final int POLL_TIME_MSEC = 500 ;
59
59
@@ -178,9 +178,8 @@ public Object executeJavaScript(String jsCommand) {
178
178
}
179
179
180
180
public void startRecording () {
181
- String recordingName = Recording .getRecordingName (browserName ,
182
- ((RemoteWebDriver ) driver ).getSessionId ().toString ());
183
- startRecording (recordingName );
181
+ startRecording (Recording .getRecordingName (browserName ,
182
+ ((RemoteWebDriver ) driver ).getSessionId ().toString ()));
184
183
}
185
184
186
185
public void startRecording (String recordingName ) {
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ void teardown() {
54
54
}
55
55
56
56
@ Test
57
- void test () throws InterruptedException {
57
+ void test () {
58
58
driver .get (
59
59
"https://bonigarcia.dev/selenium-webdriver-java/slow-calculator.html" );
60
60
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ void teardown() {
54
54
}
55
55
56
56
@ Test
57
- void test () throws InterruptedException {
57
+ void test () {
58
58
driver .get (
59
59
"https://bonigarcia.dev/selenium-webdriver-java/slow-calculator.html" );
60
60
You can’t perform that action at this time.
0 commit comments