Skip to content

Commit 3bd4b11

Browse files
committed
[java] remove non-w3c compliant options from IE Driver
These were used to set values on the Driver Service, which we agreed we do not want to do. All non-w3c compliant capabilities have been giving warnings in Java already, so ok to remove.
1 parent a9ab17a commit 3bd4b11

File tree

1 file changed

+1
-72
lines changed

1 file changed

+1
-72
lines changed

java/src/org/openqa/selenium/ie/InternetExplorerDriver.java

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -88,34 +88,6 @@ public class InternetExplorerDriver extends RemoteWebDriver {
8888
*/
8989
public static final String REQUIRE_WINDOW_FOCUS = "requireWindowFocus";
9090

91-
/**
92-
* Capability that defines the location of the file where IEDriverServer
93-
* should write log messages to.
94-
*/
95-
public static final String LOG_FILE = "logFile";
96-
97-
/**
98-
* Capability that defines the detalization level the IEDriverServer logs.
99-
*/
100-
public static final String LOG_LEVEL = "logLevel";
101-
102-
/**
103-
* Capability that defines the address of the host adapter on which
104-
* the IEDriverServer will listen for commands.
105-
*/
106-
public static final String HOST = "host";
107-
108-
/**
109-
* Capability that defines full path to directory to which will be
110-
* extracted supporting files of the IEDriverServer.
111-
*/
112-
public static final String EXTRACT_PATH = "extractPath";
113-
114-
/**
115-
* Capability that defines suppress or not diagnostic output of the IEDriverServer.
116-
*/
117-
public static final String SILENT = "silent";
118-
11991
/**
12092
* Capability that defines launch API of IE used by IEDriverServer.
12193
*/
@@ -163,7 +135,7 @@ public InternetExplorerDriver(InternetExplorerDriverService service,
163135
options = new InternetExplorerOptions();
164136
}
165137
if (service == null) {
166-
service = setupService(options);
138+
service = InternetExplorerDriverService.createDefaultService();
167139
}
168140
run(service, options);
169141
}
@@ -196,47 +168,4 @@ protected void assertOnWindows() {
196168
"You appear to be running %s. The IE driver only runs on Windows.", current));
197169
}
198170
}
199-
200-
private InternetExplorerDriverService setupService(Capabilities caps) {
201-
InternetExplorerDriverService.Builder builder = new InternetExplorerDriverService.Builder();
202-
203-
if (caps != null) {
204-
if (caps.getCapability(LOG_FILE) != null) {
205-
String value = (String) caps.getCapability(LOG_FILE);
206-
if (value != null) {
207-
builder.withLogFile(new File(value));
208-
}
209-
}
210-
211-
if (caps.getCapability(LOG_LEVEL) != null) {
212-
String value = (String) caps.getCapability(LOG_LEVEL);
213-
if (value != null) {
214-
builder.withLogLevel(InternetExplorerDriverLogLevel.valueOf(value));
215-
}
216-
}
217-
218-
if (caps.getCapability(HOST) != null) {
219-
String value = (String) caps.getCapability(HOST);
220-
if (value != null) {
221-
builder.withHost(value);
222-
}
223-
}
224-
225-
if (caps.getCapability(EXTRACT_PATH) != null) {
226-
String value = (String) caps.getCapability(EXTRACT_PATH);
227-
if (value != null) {
228-
builder.withExtractPath(new File(value));
229-
}
230-
}
231-
232-
if (caps.getCapability(SILENT) != null) {
233-
Boolean value = (Boolean) caps.getCapability(SILENT);
234-
if (value != null) {
235-
builder.withSilent(value);
236-
}
237-
}
238-
}
239-
240-
return builder.build();
241-
}
242171
}

0 commit comments

Comments
 (0)