Skip to content

Commit ec9781c

Browse files
authored
Merge branch 'trunk' into use_rbs_trace
2 parents f878c80 + 1cad0ca commit ec9781c

File tree

28 files changed

+739
-645
lines changed

28 files changed

+739
-645
lines changed

.github/workflows/ci-python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
pip install tox==4.6.4
30+
pip install tox==4.25.0
3131
- name: Test with tox
3232
run: tox -c py/tox.ini
3333
env:
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install dependencies
4848
run: |
4949
python -m pip install --upgrade pip
50-
pip install tox==4.6.4
50+
pip install tox==4.25.0
5151
- name: Test with tox
5252
run: tox -c py/tox.ini
5353
env:
@@ -69,7 +69,7 @@ jobs:
6969
- name: Install dependencies
7070
run: |
7171
python -m pip install --upgrade pip
72-
pip install tox==4.6.4
72+
pip install tox==4.25.0
7373
- name: Test with tox
7474
run: |
7575
tox -c py/tox.ini -- --cobertura-xml-report ci || true

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ To run all of the linting tools:
231231
./go py:lint
232232
```
233233

234-
You need `tox` installed to run the linting tools (`pip install tox`).
235-
236234
#### Local Installation
237235

238236
To run Python code locally without building/installing the package, you must first install the dependencies:

dotnet/src/webdriver/BiDi/Modules/Network/BytesValue.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// under the License.
1818
// </copyright>
1919

20+
using System;
2021
using System.Text.Json.Serialization;
2122

2223
namespace OpenQA.Selenium.BiDi.Modules.Network;
@@ -27,6 +28,7 @@ namespace OpenQA.Selenium.BiDi.Modules.Network;
2728
public abstract record BytesValue
2829
{
2930
public static implicit operator BytesValue(string value) => new StringBytesValue(value);
31+
public static implicit operator BytesValue(byte[] value) => new Base64BytesValue(Convert.ToBase64String(value));
3032
}
3133

3234
public record StringBytesValue(string Value) : BytesValue;

java/src/org/openqa/selenium/WebDriver.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -295,26 +295,6 @@ interface Options {
295295
*/
296296
interface Timeouts {
297297

298-
/**
299-
* @deprecated Use {@link #implicitlyWait(Duration)}
300-
* <p>Specifies the amount of time the driver should wait when searching for an element if
301-
* it is not immediately present.
302-
* <p>When searching for a single element, the driver should poll the page until the element
303-
* has been found, or this timeout expires before throwing a {@link NoSuchElementException}.
304-
* When searching for multiple elements, the driver should poll the page until at least one
305-
* element has been found or this timeout has expired.
306-
* <p>Increasing the implicit wait timeout should be used judiciously as it will have an
307-
* adverse effect on test run time, especially when used with slower location strategies
308-
* like XPath.
309-
* <p>If the timeout is negative, not null, or greater than 2e16 - 1, an error code with
310-
* invalid argument will be returned.
311-
* @param time The amount of time to wait.
312-
* @param unit The unit of measure for {@code time}.
313-
* @return A self reference.
314-
*/
315-
@Deprecated
316-
Timeouts implicitlyWait(long time, TimeUnit unit);
317-
318298
/**
319299
* Specifies the amount of time the driver should wait when searching for an element if it is
320300
* not immediately present.
@@ -333,9 +313,7 @@ interface Timeouts {
333313
* @param duration The duration to wait.
334314
* @return A self reference.
335315
*/
336-
default Timeouts implicitlyWait(Duration duration) {
337-
return implicitlyWait(duration.toMillis(), TimeUnit.MILLISECONDS);
338-
}
316+
Timeouts implicitlyWait(Duration duration);
339317

340318
/**
341319
* Gets the amount of time the driver should wait when searching for an element if it is not

java/src/org/openqa/selenium/chromium/ChromiumDriver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public void launchApp(String id) {
322322
public Map<String, Object> executeCdpCommand(String commandName, Map<String, Object> parameters) {
323323
Require.nonNull("Command Name", commandName);
324324
if (this.cdp == null) {
325-
return java.util.Collections.emptyMap();
325+
return Map.of();
326326
}
327327

328328
return cdp.executeCdpCommand(commandName, parameters);
@@ -363,7 +363,7 @@ public Optional<BiDi> maybeGetBiDi() {
363363
@Override
364364
public List<Map<String, String>> getCastSinks() {
365365
if (this.casting == null) {
366-
return java.util.Collections.emptyList();
366+
return List.of();
367367
}
368368

369369
return casting.getCastSinks();

java/src/org/openqa/selenium/firefox/Executable.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@
2626
import org.openqa.selenium.WebDriverException;
2727
import org.openqa.selenium.internal.Require;
2828

29-
/** Wrapper around Firefox executable. */
29+
/**
30+
* Wrapper around Firefox executable.
31+
*
32+
* @deprecated Class {@link FirefoxBinary} will be removed in the future. Functionality of this
33+
* class is already covered by Selenium Manager.
34+
*/
35+
@Deprecated
3036
class Executable {
3137

3238
private final File binary;
@@ -57,6 +63,12 @@ public String getVersion() {
5763
return version;
5864
}
5965

66+
/**
67+
* @deprecated Use {@link FirefoxOptions#setBinary(Path)} or {@link
68+
* FirefoxOptions#setBinary(String)} instead. Class {@link Executable} will also be removed in
69+
* the future.
70+
*/
71+
@Deprecated
6072
public FirefoxBinary.Channel getChannel() {
6173
if (channel == null) {
6274
loadChannelPref();

java/src/org/openqa/selenium/firefox/FirefoxBinary.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@
4848
@Deprecated
4949
public class FirefoxBinary {
5050

51-
/** Enumerates Firefox channels, according to https://wiki.mozilla.org/RapidRelease */
51+
/**
52+
* Enumerates Firefox channels, according to <a
53+
* href="https://wiki.mozilla.org/RapidRelease">...</a>
54+
*/
5255
public enum Channel {
5356
ESR("esr"),
5457
RELEASE("release"),

java/src/org/openqa/selenium/firefox/FirefoxOptions.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,23 @@ public FirefoxOptions configureFromEnv() {
152152
/**
153153
* Constructs a {@link FirefoxBinary} and returns that to be used, and because of this is only
154154
* useful when actually starting firefox.
155+
*
156+
* @deprecated This method is deprecated and will be removed in a future version. Selenium Manager
157+
* handles this for you.
155158
*/
159+
@Deprecated
156160
public FirefoxBinary getBinary() {
157161
return getBinaryOrNull().orElseGet(FirefoxBinary::new);
158162
}
159163

164+
/**
165+
* Sets the path to the Firefox binary to use. This is useful when you have multiple versions of
166+
* Firefox installed on your machine.
167+
*
168+
* @deprecated This method is deprecated and will be removed in a future version. Use {@link
169+
* #setBinary(Path)} or {@link #setBinary(String)} instead.
170+
*/
171+
@Deprecated
160172
public FirefoxOptions setBinary(FirefoxBinary binary) {
161173
Require.nonNull("Binary", binary);
162174
addArguments(binary.getExtraOptions());
@@ -173,6 +185,14 @@ public FirefoxOptions setBinary(String path) {
173185
return setFirefoxOption(Keys.BINARY, path);
174186
}
175187

188+
/**
189+
* Returns the binary as a {@link FirefoxBinary} if it was set, or an empty {@link Optional} if
190+
* not.
191+
*
192+
* @deprecated This method is deprecated and will be removed in a future version. Selenium Manager
193+
* handles this for you.}
194+
*/
195+
@Deprecated
176196
public Optional<FirefoxBinary> getBinaryOrNull() {
177197
Object binary = firefoxOptions.get(Keys.BINARY.key());
178198
if (!(binary instanceof String)) {

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ public class InternetExplorerDriver extends RemoteWebDriver {
3333
/** Capability that defines whether to ignore the browser zoom level or not. */
3434
public static final String IGNORE_ZOOM_SETTING = "ignoreZoomSetting";
3535

36-
/**
37-
* Capability that defines to use whether to use native or javascript events during operations.
38-
*
39-
* @deprecated Non W3C compliant
40-
*/
41-
@Deprecated public static final String NATIVE_EVENTS = "nativeEvents";
42-
4336
/** Capability that defines the initial URL to be used when IE is launched. */
4437
public static final String INITIAL_BROWSER_URL = "initialBrowserUrl";
4538

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import static org.openqa.selenium.ie.InternetExplorerDriver.IGNORE_ZOOM_SETTING;
2929
import static org.openqa.selenium.ie.InternetExplorerDriver.INITIAL_BROWSER_URL;
3030
import static org.openqa.selenium.ie.InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS;
31-
import static org.openqa.selenium.ie.InternetExplorerDriver.NATIVE_EVENTS;
3231
import static org.openqa.selenium.ie.InternetExplorerDriver.REQUIRE_WINDOW_FOCUS;
3332
import static org.openqa.selenium.remote.Browser.IE;
3433
import static org.openqa.selenium.remote.CapabilityType.BROWSER_NAME;
@@ -85,7 +84,6 @@ public class InternetExplorerOptions extends AbstractDriverOptions<InternetExplo
8584
INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,
8685
REQUIRE_WINDOW_FOCUS,
8786
UPLOAD_DIALOG_TIMEOUT,
88-
NATIVE_EVENTS,
8987
LEGACY_FILE_UPLOAD_DIALOG_HANDLING,
9088
ATTACH_TO_EDGE_CHROME,
9189
EDGE_EXECUTABLE_PATH,
@@ -202,16 +200,6 @@ public InternetExplorerOptions introduceFlakinessByIgnoringSecurityDomains() {
202200
return amend(INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
203201
}
204202

205-
/**
206-
* Method that defines to use whether to use native or javascript events during operations.
207-
*
208-
* @deprecated Non W3C compliant
209-
*/
210-
@Deprecated
211-
public InternetExplorerOptions disableNativeEvents() {
212-
return amend(NATIVE_EVENTS, false);
213-
}
214-
215203
public InternetExplorerOptions ignoreZoomSettings() {
216204
return amend(IGNORE_ZOOM_SETTING, true);
217205
}

0 commit comments

Comments
 (0)