Skip to content

Commit

Permalink
Merge branch 'trunk' into issue-13793
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani authored Nov 6, 2024
2 parents efa1e18 + 7dc68df commit 99468b5
Show file tree
Hide file tree
Showing 82 changed files with 884 additions and 935 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,4 @@ jobs:
browser: safari
os: macos
cache-key: py-safari
run: |
bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-safari-test/selenium/webdriver/safari/launcher_tests.py
run: bazel test --local_test_jobs 1 --flaky_test_attempts 3 //py:test-safari
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ maven.install(
"com.google.googlejavaformat:google-java-format:jar:1.24.0",
"com.graphql-java:graphql-java:22.3",
"dev.failsafe:failsafe:3.3.2",
"io.grpc:grpc-context:1.68.0",
"io.grpc:grpc-context:1.68.1",
"io.lettuce:lettuce-core:6.4.0.RELEASE",
"io.netty:netty-buffer:4.1.114.Final",
"io.netty:netty-codec-http:4.1.114.Final",
Expand All @@ -199,9 +199,8 @@ maven.install(
"io.opentelemetry:opentelemetry-sdk-testing:1.43.0",
"io.opentelemetry:opentelemetry-sdk-trace:1.43.0",
"io.opentelemetry.semconv:opentelemetry-semconv:1.25.0-alpha",
"io.ous:jtoml:2.0.0",
"it.ozimov:embedded-redis:0.7.3",
"net.bytebuddy:byte-buddy:1.15.7",
"net.bytebuddy:byte-buddy:1.15.10",
"org.htmlunit:htmlunit-core-js:4.5.0",
"org.apache.commons:commons-exec:1.4.0",
"org.apache.logging.log4j:log4j-core:2.24.1",
Expand All @@ -221,6 +220,7 @@ maven.install(
"org.redisson:redisson:3.37.0",
"org.slf4j:slf4j-api:2.0.16",
"org.slf4j:slf4j-jdk14:2.0.16",
"org.tomlj:tomlj:1.1.1",
"org.zeromq:jeromq:0.6.0",
],
excluded_artifacts = [
Expand Down
1 change: 0 additions & 1 deletion dotnet/docs/api/index.md

This file was deleted.

54 changes: 33 additions & 21 deletions dotnet/docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,40 @@
{
"src": [
{
"src": "../src/webdriver",
"files": [
"src/webdriver/WebDriver.csproj",
"src/support/WebDriver.Support.csproj",
"bin/**/*.dll"
],
"src": "../"
"**/*.csproj"
]
}
],
"dest": "api",
"includePrivateMembers": false,
"disableGitFeatures": false,
"disableDefaultFilter": false,
"noRestore": false,
"namespaceLayout": "flattened",
"memberLayout": "samePage",
"allowCompilationErrors": false
"dest": "webdriver",
"namespaceLayout": "nested",
"outputFormat": "apiPage"
},
{
"src": [
{
"src": "../src/support",
"files": [
"**/*.csproj"
]
}
],
"dest": "support",
"namespaceLayout": "nested",
"outputFormat": "apiPage"
}

],
"build": {
"content": [
{
"files": "**/*.{md|yml}",
"src": "api"
"files": [
"**/*.{md,yml}"
],
"exclude": [
"_site/**"
]
}
],
"resource": [
Expand All @@ -35,15 +46,16 @@
]
}
],
"dest": "../../build/docs/api/dotnet",
"globalMetadataFiles": [],
"fileMetadataFiles": [],
"output": "../../build/docs/api/dotnet",
"template": [
"default",
"modern"
],
"postProcessors": [],
"keepFileLink": false,
"disableGitFeatures": false
"globalMetadata": {
"_appName": "Selenium .NET API",
"_appLogoPath": "images/logo.svg",
"_appFaviconPath": "images/favicon.ico",
"_enableSearch": true
}
}
}
Binary file added dotnet/docs/images/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions dotnet/docs/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions dotnet/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
layout: landingPage
---

# Welcome to the Selenium .NET API Docs

## Modules
- [Selenium.WebDriver](/webdriver/OpenQA.Selenium.html)
- [Selenium.Support](/support/OpenQA.Selenium.Support.html)
File renamed without changes.
9 changes: 9 additions & 0 deletions dotnet/docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- name: Intro
href: index.md

- name: Modules
items:
- name: WebDriver
href: webdriver/OpenQA.Selenium.yml
- name: Support
href: support/OpenQA.Selenium.Support.yml
5 changes: 5 additions & 0 deletions dotnet/docs/webdriver/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
###############
# temp file #
###############
*.yml
.manifest
25 changes: 20 additions & 5 deletions dotnet/src/webdriver/Command.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,33 @@ private static Dictionary<string, object> ConvertParametersFromJson(string value
[JsonSerializable(typeof(ulong))]
[JsonSerializable(typeof(short))]
[JsonSerializable(typeof(ushort))]

[JsonSerializable(typeof(string))]

// Selenium WebDriver types
[JsonSerializable(typeof(char[]))]
[JsonSerializable(typeof(byte[]))]
[JsonSerializable(typeof(Dictionary<string, object>))]
[JsonSerializable(typeof(Chromium.ChromiumNetworkConditions))]
[JsonSerializable(typeof(Cookie))]
[JsonSerializable(typeof(ReturnedCookie))]
[JsonSerializable(typeof(Proxy))]
internal partial class CommandJsonSerializerContext : JsonSerializerContext
{

}
// Selenium Dictionaries, primarily used in Capabilities
[JsonSerializable(typeof(Dictionary<string, object>))]
[JsonSerializable(typeof(Dictionary<string, bool>))]
[JsonSerializable(typeof(Dictionary<string, byte>))]
[JsonSerializable(typeof(Dictionary<string, sbyte>))]
[JsonSerializable(typeof(Dictionary<string, char>))]
[JsonSerializable(typeof(Dictionary<string, decimal>))]
[JsonSerializable(typeof(Dictionary<string, double>))]
[JsonSerializable(typeof(Dictionary<string, float>))]
[JsonSerializable(typeof(Dictionary<string, int>))]
[JsonSerializable(typeof(Dictionary<string, uint>))]
[JsonSerializable(typeof(Dictionary<string, nint>))]
[JsonSerializable(typeof(Dictionary<string, nuint>))]
[JsonSerializable(typeof(Dictionary<string, long>))]
[JsonSerializable(typeof(Dictionary<string, ulong>))]
[JsonSerializable(typeof(Dictionary<string, short>))]
[JsonSerializable(typeof(Dictionary<string, ushort>))]
[JsonSerializable(typeof(Dictionary<string, string>))]
internal partial class CommandJsonSerializerContext : JsonSerializerContext;
}
22 changes: 12 additions & 10 deletions dotnet/src/webdriver/Interactions/ActionSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ namespace OpenQA.Selenium.Interactions
public class ActionSequence
{
private List<Interaction> interactions = new List<Interaction>();
private InputDevice device;

/// <summary>
/// Initializes a new instance of the <see cref="ActionSequence"/> class.
Expand All @@ -52,7 +51,7 @@ public ActionSequence(InputDevice device, int initialSize)
throw new ArgumentNullException(nameof(device), "Input device cannot be null.");
}

this.device = device;
this.InputDevice = device;

for (int i = 0; i < initialSize; i++)
{
Expand All @@ -71,10 +70,13 @@ public int Count
/// <summary>
/// Gets the input device for this Action sequence.
/// </summary>
public InputDevice inputDevice
{
get { return this.inputDevice; }
}
[Obsolete("This property has been renamed to InputDevice and will be removed in a future version")]
public InputDevice inputDevice => InputDevice;

/// <summary>
/// Gets the input device for this Action sequence.
/// </summary>
public InputDevice InputDevice { get; }

/// <summary>
/// Adds an action to the sequence.
Expand All @@ -88,9 +90,9 @@ public ActionSequence AddAction(Interaction interactionToAdd)
throw new ArgumentNullException(nameof(interactionToAdd), "Interaction to add to sequence must not be null");
}

if (!interactionToAdd.IsValidFor(this.device.DeviceKind))
if (!interactionToAdd.IsValidFor(this.InputDevice.DeviceKind))
{
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Interaction {0} is invalid for device type {1}.", interactionToAdd.GetType(), this.device.DeviceKind), nameof(interactionToAdd));
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Interaction {0} is invalid for device type {1}.", interactionToAdd.GetType(), this.InputDevice.DeviceKind), nameof(interactionToAdd));
}

this.interactions.Add(interactionToAdd);
Expand All @@ -103,7 +105,7 @@ public ActionSequence AddAction(Interaction interactionToAdd)
/// <returns>A <see cref="Dictionary{TKey, TValue}"/> containing the actions in this sequence.</returns>
public Dictionary<string, object> ToDictionary()
{
Dictionary<string, object> toReturn = this.device.ToDictionary();
Dictionary<string, object> toReturn = this.InputDevice.ToDictionary();

List<object> encodedActions = new List<object>();
foreach (Interaction action in this.interactions)
Expand All @@ -122,7 +124,7 @@ public Dictionary<string, object> ToDictionary()
/// <returns>A string that represents the current <see cref="ActionSequence"/>.</returns>
public override string ToString()
{
StringBuilder builder = new StringBuilder("Action sequence - ").Append(this.device.ToString());
StringBuilder builder = new StringBuilder("Action sequence - ").Append(this.InputDevice.ToString());
foreach (Interaction action in this.interactions)
{
builder.AppendLine();
Expand Down
Loading

0 comments on commit 99468b5

Please sign in to comment.