1
- /*
2
- Copyright 2012 Selenium committers
3
- Copyright 2012 Software Freedom Conservancy
4
-
5
- Licensed under the Apache License, Version 2.0 (the "License");
6
- you may not use this file except in compliance with the License.
7
- You may obtain a copy of the License at
8
-
9
- http://www.apache.org/licenses/LICENSE-2.0
10
-
11
- Unless required by applicable law or agreed to in writing, software
12
- distributed under the License is distributed on an "AS IS" BASIS,
13
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- See the License for the specific language governing permissions and
15
- limitations under the License.
16
- */
1
+ // Licensed to the Software Freedom Conservancy (SFC) under one
2
+ // or more contributor license agreements. See the NOTICE file
3
+ // distributed with this work for additional information
4
+ // regarding copyright ownership. The SFC licenses this file
5
+ // to you under the Apache License, Version 2.0 (the
6
+ // "License"); you may not use this file except in compliance
7
+ // with the License. You may obtain a copy of the License at
8
+ //
9
+ // http://www.apache.org/licenses/LICENSE-2.0
10
+ //
11
+ // Unless required by applicable law or agreed to in writing,
12
+ // software distributed under the License is distributed on an
13
+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ // KIND, either express or implied. See the License for the
15
+ // specific language governing permissions and limitations
16
+ // under the License.
17
17
18
18
19
19
package com .thoughtworks .selenium ;
23
23
24
24
/**
25
25
* Contains parameters for a single Selenium browser session.
26
- *
26
+ *
27
27
* BrowserConfigurationOptions is used as an argument to {@code Selenium.start()}. The parameters
28
28
* set within will override any command-line parameters set for the same option.
29
- *
29
+ *
30
30
* @author jbevan, chandrap
31
- *
31
+ *
32
32
*/
33
33
public class BrowserConfigurationOptions {
34
34
public static final String PROXY_CONFIG = "proxy" ;
@@ -53,7 +53,7 @@ public BrowserConfigurationOptions() {
53
53
54
54
/**
55
55
* Returns true if any options are set in this instance.
56
- *
56
+ *
57
57
* @return true if any options are set in this instance.
58
58
*/
59
59
public boolean hasOptions () {
@@ -62,7 +62,7 @@ public boolean hasOptions() {
62
62
63
63
/**
64
64
* Serializes to the format "name=value;name=value".
65
- *
65
+ *
66
66
* @return String with the above format.
67
67
*/
68
68
public String serialize () {
@@ -82,7 +82,7 @@ public String serialize() {
82
82
/**
83
83
* Sets the name of the profile, which must exist in the -profilesLocation directory, to use for
84
84
* this browser session.
85
- *
85
+ *
86
86
* @param profile the name of the profile.
87
87
* @return this BrowserConfigurationOptions object.
88
88
*/
@@ -98,7 +98,7 @@ protected String getProfile() {
98
98
99
99
/**
100
100
* Returns true if the {@code SINGLE_WINDOW} field is set.
101
- *
101
+ *
102
102
* @return true if {@code SINGLE_WINDOW} is set.
103
103
*/
104
104
protected boolean isSingleWindow () {
@@ -110,7 +110,7 @@ protected boolean isSingleWindow() {
110
110
111
111
/**
112
112
* Returns true if the {@code MULTI_WINDOW} field is set.
113
- *
113
+ *
114
114
* @return true if {@code MULTI_WINDOW} is set.
115
115
*/
116
116
protected boolean isMultiWindow () {
@@ -149,7 +149,7 @@ protected String getBrowserExecutablePath() {
149
149
150
150
/**
151
151
* Sets the full path for the browser executable.
152
- *
152
+ *
153
153
* @param executablePath the full path for the browser executable.
154
154
*/
155
155
public BrowserConfigurationOptions setBrowserExecutablePath (String executablePath ) {
@@ -159,7 +159,7 @@ public BrowserConfigurationOptions setBrowserExecutablePath(String executablePat
159
159
160
160
/**
161
161
* Sets the timeout, in seconds, for all commands.
162
- *
162
+ *
163
163
* @param timeout the timeout for all commands
164
164
* @return this BrowserConfigurationOptions instance.
165
165
*/
@@ -176,15 +176,15 @@ protected int getTimeoutInSeconds() {
176
176
177
177
/**
178
178
* Sets the "mode" for the browser.
179
- *
179
+ *
180
180
* Historically, the 'browser' argument for getNewBrowserSession implied the mode for the browser.
181
181
* For example, *iehta indicated HTA mode for IE, whereas *iexplore indicated the default user
182
182
* mode. Using this method allows a browser mode to be specified independently of the base
183
183
* browser, eg. "HTA" or "PROXY".
184
- *
184
+ *
185
185
* Note that absolutely no publication nor synchronization of these hard-coded strings such as
186
186
* "HTA" has yet been done. Use at your own risk until this is rectified.
187
- *
187
+ *
188
188
* @param mode
189
189
*/
190
190
public BrowserConfigurationOptions setBrowserMode (String mode ) {
@@ -231,7 +231,7 @@ public String get(String key) {
231
231
/**
232
232
* Sets the given key to the given value unless the value is null. In that case, no entry for the
233
233
* key is made.
234
- *
234
+ *
235
235
* @param key the name of the key
236
236
* @param value the value for the key
237
237
*/
0 commit comments