Skip to content

Commit 5f079bc

Browse files
committed
java: Extracting a new interface for setFileDetector method, it is required to build dynamic proxies in EventFiringWebDriver-style
1 parent eb9f660 commit 5f079bc

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

Diff for: java/client/src/org/openqa/selenium/remote/BUCK

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ java_library(name = 'remote',
3636
'CommandCodec.java',
3737
'CommandInfo.java',
3838
'CoordinatesUtils.java',
39+
'DetectsFiles.java',
3940
'DriverCommand.java',
4041
'ErrorCodes.java',
4142
'ErrorHandler.java',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
Copyright 2007-2015 Software Freedom Conservancy
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package org.openqa.selenium.remote;
18+
19+
public interface DetectsFiles {
20+
21+
/**
22+
* Set the file detector to be used when sending keyboard input.
23+
*
24+
* @param detector The detector to use. Must not be null.
25+
* @see FileDetector
26+
*/
27+
void setFileDetector(FileDetector detector);
28+
29+
}

Diff for: java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.openqa.selenium.Dimension;
3232
import org.openqa.selenium.HasCapabilities;
3333
import org.openqa.selenium.JavascriptExecutor;
34-
import org.openqa.selenium.NoSuchElementException;
3534
import org.openqa.selenium.NoSuchFrameException;
3635
import org.openqa.selenium.OutputType;
3736
import org.openqa.selenium.Platform;
@@ -77,7 +76,7 @@
7776
public class RemoteWebDriver implements WebDriver, JavascriptExecutor,
7877
FindsById, FindsByClassName, FindsByLinkText, FindsByName,
7978
FindsByCssSelector, FindsByTagName, FindsByXPath,
80-
HasInputDevices, HasCapabilities, TakesScreenshot {
79+
HasInputDevices, HasCapabilities, TakesScreenshot, DetectsFiles {
8180

8281
// TODO(dawagner): This static logger should be unified with the per-instance localLogs
8382
private static final Logger logger = Logger.getLogger(RemoteWebDriver.class.getName());

Diff for: java/client/src/org/openqa/selenium/remote/build.desc

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ java_library(name = "remote",
7272
"CommandCodec.java",
7373
"CommandInfo.java",
7474
"CoordinatesUtils.java",
75+
"DetectsFiles.java",
7576
"ExecuteMethod.java",
7677
"FileDetector.java",
7778
"HttpCommandExecutor.java",

0 commit comments

Comments
 (0)