From 90872672396012c352be2cca67d732280ed6c35d Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Thu, 5 Oct 2023 13:40:46 +0300 Subject: [PATCH 01/16] Add more nuget package metainfo --- dotnet/BUILD.bazel | 8 ++--- dotnet/private/nuget_pack.bzl | 2 +- dotnet/src/support/BUILD.bazel | 16 ++++----- .../WebDriver.Support.StrongNamed.nuspec | 21 ++++-------- dotnet/src/support/WebDriver.Support.nuspec | 21 ++++-------- dotnet/src/webdriver/BUILD.bazel | 34 +++++++++++++------ .../webdriver/WebDriver.StrongNamed.nuspec | 19 +++++------ dotnet/src/webdriver/WebDriver.nuspec | 19 +++++------ .../webdriver/{build => assets}/BUILD.bazel | 1 + dotnet/src/webdriver/assets/README.md | 19 +++++++++++ .../Selenium.WebDriver.targets | 0 11 files changed, 87 insertions(+), 73 deletions(-) rename dotnet/src/webdriver/{build => assets}/BUILD.bazel (75%) create mode 100644 dotnet/src/webdriver/assets/README.md rename dotnet/src/webdriver/{build => assets}/Selenium.WebDriver.targets (100%) diff --git a/dotnet/BUILD.bazel b/dotnet/BUILD.bazel index 13a56b1506092..5f49606038559 100644 --- a/dotnet/BUILD.bazel +++ b/dotnet/BUILD.bazel @@ -8,15 +8,15 @@ exports_files([ pkg_zip( name = "strongnamed", srcs = [ - "//dotnet/src/support:support-strongnamed", - "//dotnet/src/webdriver:webdriver-strongnamed", + "//dotnet/src/support:support-strongnamed-pack", + "//dotnet/src/webdriver:webdriver-strongnamed-pack", ], ) pkg_zip( name = "release", srcs = [ - "//dotnet/src/support", - "//dotnet/src/webdriver", + "//dotnet/src/support:support-pack", + "//dotnet/src/webdriver:webdriver-pack", ], ) diff --git a/dotnet/private/nuget_pack.bzl b/dotnet/private/nuget_pack.bzl index 1197c6169aa24..a970bfcb84d48 100644 --- a/dotnet/private/nuget_pack.bzl +++ b/dotnet/private/nuget_pack.bzl @@ -98,7 +98,7 @@ def nuget_pack_impl(ctx): packages_cmd = "mkdir -p %s " % packages.path transitive_libs = depset(transitive = [l[DotnetAssemblyInfo].transitive_runtime_deps for l in ctx.attr.libs]).to_list() - package_files = depset([lib.nuget_info.nupkg for lib in transitive_libs]).to_list() + package_files = depset([lib.nuget_info.nupkg for lib in transitive_libs if hasattr(lib.nuget_info, "nupkg")]).to_list() if len(package_files): packages_cmd += "&& cp " + " ".join([f.path for f in package_files]) + " " + packages.path diff --git a/dotnet/src/support/BUILD.bazel b/dotnet/src/support/BUILD.bazel index 298d1e270e9ff..cb6c75e605d05 100644 --- a/dotnet/src/support/BUILD.bazel +++ b/dotnet/src/support/BUILD.bazel @@ -27,7 +27,7 @@ generated_assembly_info( ) csharp_library( - name = "support-lib", + name = "support", srcs = glob([ "*.cs", "Events/*.cs", @@ -49,13 +49,13 @@ csharp_library( ) nuget_pack( - name = "support", + name = "support-pack", files = { - "//common/images:selenium_logo_small.png": "images/icon.png", + "//common/images:selenium_logo_small.png": "icon.png", }, id = "Selenium.Support", libs = { - ":support-lib": "WebDriver.Support", + ":support": "WebDriver.Support", }, nuspec_template = "WebDriver.Support.nuspec", tags = [ @@ -66,7 +66,7 @@ nuget_pack( ) csharp_library( - name = "support-strongnamed-lib", + name = "support-strongnamed", srcs = glob([ "*.cs", "Events/*.cs", @@ -89,13 +89,13 @@ csharp_library( ) nuget_pack( - name = "support-strongnamed", + name = "support-strongnamed-pack", files = { - "//common/images:selenium_logo_small.png": "images/icon.png", + "//common/images:selenium_logo_small.png": "icon.png", }, id = "Selenium.Support.StrongNamed", libs = { - ":support-strongnamed-lib": "WebDriver.Support.StrongNamed", + ":support-strongnamed": "WebDriver.Support.StrongNamed", }, nuspec_template = "WebDriver.Support.StrongNamed.nuspec", tags = [ diff --git a/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec b/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec index d61d53359823f..804fef803aee8 100644 --- a/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec +++ b/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec @@ -4,35 +4,28 @@ $packageid$ $version$ Selenium Committers - Copyright © 2020 Software Freedom Conservancy + Copyright © 2023 Software Freedom Conservancy selenium WebDriver Support false Provides support classes for Selenium WebDriver - Selenium is a set of different software tools each with a different approach - to supporting browser automation. These tools are highly flexible, allowing - many options for locating and manipulating elements within a browser, and one - of its key features is the support for automating multiple browser platforms. - This package contains .NET support utilites and classes that users may find - useful in using Selenium WebDriver. These support classes are mainly intended - to spark ideas of what is possible with Selenium WebDriver, and may not be - entirely appropriate for production use. + Selenium is a set of different software tools each with a different approach to supporting browser automation. These tools are highly flexible, allowing many options for locating and manipulating elements within a browser, and one of its key features is the support for automating multiple browser platforms. This package contains the .NET bindings for the concise and object-based Selenium WebDriver API, which uses native OS-level events to manipulate the browser, bypassing the JavaScript sandbox, and does not require the Selenium Server to automate the browser. https://selenium.dev - + Apache-2.0 https://selenium.dev/images/selenium_logo_square_green.png - images\icon.png + icon.png selenium webdriver support browser automation + + See the latest changes, included in this release, at https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/dotnet/CHANGELOG. + - - - diff --git a/dotnet/src/support/WebDriver.Support.nuspec b/dotnet/src/support/WebDriver.Support.nuspec index 3b07f39f0584e..98e90af63214d 100644 --- a/dotnet/src/support/WebDriver.Support.nuspec +++ b/dotnet/src/support/WebDriver.Support.nuspec @@ -4,35 +4,28 @@ $packageid$ $version$ Selenium Committers - Copyright © 2020 Software Freedom Conservancy + Copyright © 2023 Software Freedom Conservancy selenium WebDriver Support false Provides support classes for Selenium WebDriver - Selenium is a set of different software tools each with a different approach - to supporting browser automation. These tools are highly flexible, allowing - many options for locating and manipulating elements within a browser, and one - of its key features is the support for automating multiple browser platforms. - This package contains .NET support utilites and classes that users may find - useful in using Selenium WebDriver. These support classes are mainly intended - to spark ideas of what is possible with Selenium WebDriver, and may not be - entirely appropriate for production use. + Selenium is a set of different software tools each with a different approach to supporting browser automation. These tools are highly flexible, allowing many options for locating and manipulating elements within a browser, and one of its key features is the support for automating multiple browser platforms. This package contains the .NET bindings for the concise and object-based Selenium WebDriver API, which uses native OS-level events to manipulate the browser, bypassing the JavaScript sandbox, and does not require the Selenium Server to automate the browser. https://selenium.dev - + Apache-2.0 https://selenium.dev/images/selenium_logo_square_green.png - images\icon.png + icon.png selenium webdriver support browser automation + + See the latest changes, included in this release, at https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/dotnet/CHANGELOG. + - - - diff --git a/dotnet/src/webdriver/BUILD.bazel b/dotnet/src/webdriver/BUILD.bazel index ced518cc07a33..ab3dbc786190b 100644 --- a/dotnet/src/webdriver/BUILD.bazel +++ b/dotnet/src/webdriver/BUILD.bazel @@ -26,7 +26,7 @@ generated_assembly_info( ) csharp_library( - name = "webdriver-lib", + name = "webdriver", srcs = [ ":assembly-info", ] + glob([ @@ -46,6 +46,9 @@ csharp_library( target_frameworks = [ "netstandard2.0", ], + visibility = [ + "//dotnet:__subpackages__", + ], deps = [ framework("nuget", "NETStandard.Library"), framework("nuget", "Newtonsoft.Json"), @@ -54,7 +57,7 @@ csharp_library( ) csharp_library( - name = "webdriver-strongnamed-lib", + name = "webdriver-strongnamed", srcs = [ ":assembly-info", ] + glob([ @@ -75,6 +78,9 @@ csharp_library( target_frameworks = [ "netstandard2.0", ], + visibility = [ + "//dotnet:__subpackages__", + ], deps = [ framework("nuget", "NETStandard.Library"), framework("nuget", "Newtonsoft.Json"), @@ -82,31 +88,38 @@ csharp_library( ], ) +copy_file( + name = "readme", + src = "//dotnet/src/webdriver/assets:README.md", + out = "README.md", +) + copy_file( name = "props", - src = "//dotnet/src/webdriver/build:Selenium.WebDriver.targets", + src = "//dotnet/src/webdriver/assets:Selenium.WebDriver.targets", out = "Selenium.WebDriver.targets", ) copy_file( name = "transitive-props", - src = "//dotnet/src/webdriver/build:Selenium.WebDriver.targets", + src = "//dotnet/src/webdriver/assets:Selenium.WebDriver.targets", out = "transitive.Selenium.WebDriver.targets", ) nuget_pack( - name = "webdriver", + name = "webdriver-pack", files = { - "//common/images:selenium_logo_small.png": "images/icon.png", + "//common/images:selenium_logo_small.png": "icon.png", "//common/manager:selenium-manager-linux": "manager/linux/selenium-manager", "//common/manager:selenium-manager-macos": "manager/macos/selenium-manager", "//common/manager:selenium-manager-windows": "manager/windows/selenium-manager.exe", + ":readme": "README.md", ":props": "build/Selenium.WebDriver.targets", ":transitive-props": "buildTransitive/Selenium.WebDriver.targets", }, id = "Selenium.WebDriver", libs = { - ":webdriver-lib": "WebDriver", + ":webdriver": "WebDriver", }, nuspec_template = "WebDriver.nuspec", tags = [ @@ -119,18 +132,19 @@ nuget_pack( ) nuget_pack( - name = "webdriver-strongnamed", + name = "webdriver-strongnamed-pack", files = { - "//common/images:selenium_logo_small.png": "images/icon.png", + "//common/images:selenium_logo_small.png": "icon.png", "//common/manager:selenium-manager-linux": "manager/linux/selenium-manager", "//common/manager:selenium-manager-macos": "manager/macos/selenium-manager", "//common/manager:selenium-manager-windows": "manager/windows/selenium-manager.exe", + ":readme": "README.md", ":props": "build/Selenium.WebDriver.StrongNamed.targets", ":transitive-props": "buildTransitive/Selenium.WebDriver.StrongNamed.targets", }, id = "Selenium.WebDriver.StrongNamed", libs = { - ":webdriver-strongnamed-lib": "WebDriver.StrongNamed", + ":webdriver-strongnamed": "WebDriver.StrongNamed", }, nuspec_template = "WebDriver.StrongNamed.nuspec", property_group_vars = { diff --git a/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec b/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec index 64567f9f882b1..8ee7e4254ef5a 100644 --- a/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec +++ b/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec @@ -4,27 +4,24 @@ $packageid$ $version$ Selenium Committers - Copyright © 2020 Software Freedom Conservancy + Copyright © 2023 Software Freedom Conservancy selenium Selenium WebDriver false .NET bindings for the Selenium WebDriver API - Selenium is a set of different software tools each with a different approach - to supporting browser automation. These tools are highly flexible, allowing - many options for locating and manipulating elements within a browser, and one - of its key features is the support for automating multiple browser platforms. - This package contains the .NET bindings for the concise and object-based - Selenium WebDriver API, which uses native OS-level events to manipulate the - browser, bypassing the JavaScript sandbox, and does not require the Selenium - Server to automate the browser. + Selenium is a set of different software tools each with a different approach to supporting browser automation. These tools are highly flexible, allowing many options for locating and manipulating elements within a browser, and one of its key features is the support for automating multiple browser platforms. This package contains the .NET bindings for the concise and object-based Selenium WebDriver API, which uses native OS-level events to manipulate the browser, bypassing the JavaScript sandbox, and does not require the Selenium Server to automate the browser. https://selenium.dev - + Apache-2.0 https://selenium.dev/images/selenium_logo_square_green.png - images\icon.png + icon.png selenium webdriver browser automation + README.md + + See the latest changes, included in this release, at https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/dotnet/CHANGELOG. + diff --git a/dotnet/src/webdriver/WebDriver.nuspec b/dotnet/src/webdriver/WebDriver.nuspec index 64567f9f882b1..8ee7e4254ef5a 100644 --- a/dotnet/src/webdriver/WebDriver.nuspec +++ b/dotnet/src/webdriver/WebDriver.nuspec @@ -4,27 +4,24 @@ $packageid$ $version$ Selenium Committers - Copyright © 2020 Software Freedom Conservancy + Copyright © 2023 Software Freedom Conservancy selenium Selenium WebDriver false .NET bindings for the Selenium WebDriver API - Selenium is a set of different software tools each with a different approach - to supporting browser automation. These tools are highly flexible, allowing - many options for locating and manipulating elements within a browser, and one - of its key features is the support for automating multiple browser platforms. - This package contains the .NET bindings for the concise and object-based - Selenium WebDriver API, which uses native OS-level events to manipulate the - browser, bypassing the JavaScript sandbox, and does not require the Selenium - Server to automate the browser. + Selenium is a set of different software tools each with a different approach to supporting browser automation. These tools are highly flexible, allowing many options for locating and manipulating elements within a browser, and one of its key features is the support for automating multiple browser platforms. This package contains the .NET bindings for the concise and object-based Selenium WebDriver API, which uses native OS-level events to manipulate the browser, bypassing the JavaScript sandbox, and does not require the Selenium Server to automate the browser. https://selenium.dev - + Apache-2.0 https://selenium.dev/images/selenium_logo_square_green.png - images\icon.png + icon.png selenium webdriver browser automation + README.md + + See the latest changes, included in this release, at https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/dotnet/CHANGELOG. + diff --git a/dotnet/src/webdriver/build/BUILD.bazel b/dotnet/src/webdriver/assets/BUILD.bazel similarity index 75% rename from dotnet/src/webdriver/build/BUILD.bazel rename to dotnet/src/webdriver/assets/BUILD.bazel index 8c71e172b86e2..0b1c50ee9e063 100644 --- a/dotnet/src/webdriver/build/BUILD.bazel +++ b/dotnet/src/webdriver/assets/BUILD.bazel @@ -1,3 +1,4 @@ exports_files([ + "README.md", "Selenium.WebDriver.targets", ]) diff --git a/dotnet/src/webdriver/assets/README.md b/dotnet/src/webdriver/assets/README.md new file mode 100644 index 0000000000000..882038a73edf2 --- /dev/null +++ b/dotnet/src/webdriver/assets/README.md @@ -0,0 +1,19 @@ +Selenium is a set of different software tools each with a different approach to supporting browser automation. These tools are highly flexible, allowing many options for locating and manipulating elements within a browser, and one of its key features is the support for automating multiple browser platforms. This package contains the .NET bindings for the concise and object-based Selenium WebDriver API, which uses native OS-level events to manipulate the browser, bypassing the JavaScript sandbox, and does not require the Selenium Server to automate the browser. + +# Usage + +```csharp +using OpenQA.Selenium.Chrome; +using OpenQA.Selenium; + +var driver = new ChromeDriver(); + +driver.Url = "https://www.google.com"; +driver.FindElement(By.Name("q")).SendKeys("webdriver" + Keys.Return); +Console.WriteLine(driver.Title); + +driver.Quit(); +``` + +# Contributing +Contributions are accepted either through [GitHub](https://github.com/SeleniumHQ/selenium/) pull requests or patches via the [Selenium issue tracker](https://github.com/SeleniumHQ/selenium/issues). diff --git a/dotnet/src/webdriver/build/Selenium.WebDriver.targets b/dotnet/src/webdriver/assets/Selenium.WebDriver.targets similarity index 100% rename from dotnet/src/webdriver/build/Selenium.WebDriver.targets rename to dotnet/src/webdriver/assets/Selenium.WebDriver.targets From 51237c40e94a05d914b35eb5271876860b204cf1 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Thu, 5 Oct 2023 13:57:10 +0300 Subject: [PATCH 02/16] Adjust bazel target names --- .github/workflows/ci-dotnet.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index f569f3e10a7da..cf0be026ed1d1 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -12,9 +12,7 @@ jobs: name: Build cache-key: false os: windows - run: | - bazel build //dotnet/src/webdriver - bazel build //dotnet/src/support + run: bazel build //dotnet/src/webdriver:webdriver-pack //dotnet/src/support:support-pack integration-tests: name: Browser Tests From 4ceea0216842035d98fce7b63c5f27e6dd8a70dc Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Thu, 5 Oct 2023 14:31:36 +0300 Subject: [PATCH 03/16] Run build job on ubuntu --- .github/workflows/ci-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index cf0be026ed1d1..135df43a79dd4 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -11,7 +11,7 @@ jobs: with: name: Build cache-key: false - os: windows + os: ubuntu run: bazel build //dotnet/src/webdriver:webdriver-pack //dotnet/src/support:support-pack integration-tests: From 0beab66ed9fa17d8c2bb826b13f57f057b7dbfaa Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Thu, 5 Oct 2023 17:14:42 +0300 Subject: [PATCH 04/16] Revert "Run build job on ubuntu" This reverts commit 4ceea0216842035d98fce7b63c5f27e6dd8a70dc. --- .github/workflows/ci-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index 135df43a79dd4..cf0be026ed1d1 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -11,7 +11,7 @@ jobs: with: name: Build cache-key: false - os: ubuntu + os: windows run: bazel build //dotnet/src/webdriver:webdriver-pack //dotnet/src/support:support-pack integration-tests: From cae7793ad22c0285c7b4d7a1177d46dc28d1f4d7 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Thu, 5 Oct 2023 19:28:00 +0300 Subject: [PATCH 05/16] Hack to make bazel + nuget work on GitHub actions linux+macos --- dotnet/private/dotnet_utils.bzl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dotnet/private/dotnet_utils.bzl b/dotnet/private/dotnet_utils.bzl index 066d6cac47fa3..afd72bee99007 100644 --- a/dotnet/private/dotnet_utils.bzl +++ b/dotnet/private/dotnet_utils.bzl @@ -21,6 +21,9 @@ export CWD=$(pwd) export APPDATA="$(pwd)" export PROGRAMFILES="$(pwd)" +# Required to make NuGet tool work on non-writable home path like GitHub actions +export XDG_DATA_HOME=$(mktemp -d) + # Create `global.json` to trick .Net into using the hermetic toolchain # https://learn.microsoft.com/en-us/dotnet/core/tools/global-json echo '{{"sdk": {{"version": "{version}"}} }}' >$(pwd)/global.json From ae715a9819b4412b4590183c12c78c10f5a940f7 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Fri, 6 Oct 2023 18:18:25 +0300 Subject: [PATCH 06/16] Fix csproj to work with new assets folder --- dotnet/src/webdriver/WebDriver.csproj | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dotnet/src/webdriver/WebDriver.csproj b/dotnet/src/webdriver/WebDriver.csproj index 2fd8002edd459..238454d1f7ff4 100644 --- a/dotnet/src/webdriver/WebDriver.csproj +++ b/dotnet/src/webdriver/WebDriver.csproj @@ -93,19 +93,16 @@ ..\..\..\common\manager - - - ..\..\..\common\images - - + + - + - + From d4e0aa4f89b59d6ec1b9287ada57715e66b10e5c Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Sat, 7 Oct 2023 22:21:56 +0300 Subject: [PATCH 07/16] Fix CI .NET Build flow --- .github/workflows/ci-dotnet.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index cf0be026ed1d1..3532139968f5d 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -12,7 +12,9 @@ jobs: name: Build cache-key: false os: windows - run: bazel build //dotnet/src/webdriver:webdriver-pack //dotnet/src/support:support-pack + run: | + bazel build //dotnet/src/webdriver:webdriver-pack + bazel build //dotnet/src/support:support-pack integration-tests: name: Browser Tests From 9451c28cd3ac1635aa5d3a832b3f7a12b158e2b6 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Sat, 7 Oct 2023 22:36:31 +0300 Subject: [PATCH 08/16] Revert "Fix CI .NET Build flow" This reverts commit d4e0aa4f89b59d6ec1b9287ada57715e66b10e5c. --- .github/workflows/ci-dotnet.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index 3532139968f5d..cf0be026ed1d1 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -12,9 +12,7 @@ jobs: name: Build cache-key: false os: windows - run: | - bazel build //dotnet/src/webdriver:webdriver-pack - bazel build //dotnet/src/support:support-pack + run: bazel build //dotnet/src/webdriver:webdriver-pack //dotnet/src/support:support-pack integration-tests: name: Browser Tests From 9f00298b2df6e1079dc9c0d373c3f47604d271d4 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Sat, 7 Oct 2023 22:46:22 +0300 Subject: [PATCH 09/16] Make build of support lib visible upstream --- dotnet/src/support/BUILD.bazel | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dotnet/src/support/BUILD.bazel b/dotnet/src/support/BUILD.bazel index cb6c75e605d05..e04a99f5dbffb 100644 --- a/dotnet/src/support/BUILD.bazel +++ b/dotnet/src/support/BUILD.bazel @@ -42,6 +42,9 @@ csharp_library( target_frameworks = [ "netstandard2.0", ], + visibility = [ + "//dotnet:__subpackages__", + ], deps = [ "//dotnet/src/webdriver", framework("nuget", "NETStandard.Library"), From d466863b3c0c2ead25c0fd2f7e2d8f49f6024ba0 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Sat, 7 Oct 2023 23:41:39 +0300 Subject: [PATCH 10/16] Run all tests on github actions --- .github/workflows/ci-dotnet.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci-dotnet.yml b/.github/workflows/ci-dotnet.yml index cf0be026ed1d1..bb6c067633325 100644 --- a/.github/workflows/ci-dotnet.yml +++ b/.github/workflows/ci-dotnet.yml @@ -39,7 +39,4 @@ jobs: java-version: 17 os: windows run: | - bazel build //dotnet/test/common:${{ matrix.browser }} - $env:ACTIVE_DRIVER_CONFIG = '${{ matrix.driver }}' - cd dotnet - dotnet test test/common/WebDriver.Common.Tests.csproj --framework ${{ matrix.framework }} + bazel test //dotnet/test/common:AllTests From 23fb78e9ea2bb787be48336671140a2852b6eb31 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Mon, 9 Oct 2023 14:01:42 +0300 Subject: [PATCH 11/16] Fix reference to target file in tests project --- dotnet/test/common/WebDriver.Common.Tests.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotnet/test/common/WebDriver.Common.Tests.csproj b/dotnet/test/common/WebDriver.Common.Tests.csproj index 9cae056c97d25..e7a29c6109955 100644 --- a/dotnet/test/common/WebDriver.Common.Tests.csproj +++ b/dotnet/test/common/WebDriver.Common.Tests.csproj @@ -58,6 +58,6 @@ ..\..\..\common\manager - + From 64622f3d3fd4f4e0c35e2c5d4949998e94ec34c6 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Tue, 17 Oct 2023 22:01:55 +0300 Subject: [PATCH 12/16] Revert bazel related changes --- dotnet/BUILD.bazel | 8 ++++---- dotnet/private/nuget_pack.bzl | 2 +- dotnet/src/support/BUILD.bazel | 13 +++++-------- dotnet/src/webdriver/BUILD.bazel | 18 ++++++------------ 4 files changed, 16 insertions(+), 25 deletions(-) diff --git a/dotnet/BUILD.bazel b/dotnet/BUILD.bazel index 5f49606038559..4d343f42e8d3c 100644 --- a/dotnet/BUILD.bazel +++ b/dotnet/BUILD.bazel @@ -8,15 +8,15 @@ exports_files([ pkg_zip( name = "strongnamed", srcs = [ - "//dotnet/src/support:support-strongnamed-pack", - "//dotnet/src/webdriver:webdriver-strongnamed-pack", + "//dotnet/src/support:support-strongnamed", + "//dotnet/src/webdriver:webdriver-strongnamed", ], ) pkg_zip( name = "release", srcs = [ - "//dotnet/src/support:support-pack", - "//dotnet/src/webdriver:webdriver-pack", + "//dotnet/src/support:support", + "//dotnet/src/webdriver:webdriver", ], ) diff --git a/dotnet/private/nuget_pack.bzl b/dotnet/private/nuget_pack.bzl index a970bfcb84d48..1197c6169aa24 100644 --- a/dotnet/private/nuget_pack.bzl +++ b/dotnet/private/nuget_pack.bzl @@ -98,7 +98,7 @@ def nuget_pack_impl(ctx): packages_cmd = "mkdir -p %s " % packages.path transitive_libs = depset(transitive = [l[DotnetAssemblyInfo].transitive_runtime_deps for l in ctx.attr.libs]).to_list() - package_files = depset([lib.nuget_info.nupkg for lib in transitive_libs if hasattr(lib.nuget_info, "nupkg")]).to_list() + package_files = depset([lib.nuget_info.nupkg for lib in transitive_libs]).to_list() if len(package_files): packages_cmd += "&& cp " + " ".join([f.path for f in package_files]) + " " + packages.path diff --git a/dotnet/src/support/BUILD.bazel b/dotnet/src/support/BUILD.bazel index e04a99f5dbffb..86f0a9611a2fd 100644 --- a/dotnet/src/support/BUILD.bazel +++ b/dotnet/src/support/BUILD.bazel @@ -27,7 +27,7 @@ generated_assembly_info( ) csharp_library( - name = "support", + name = "support-lib", srcs = glob([ "*.cs", "Events/*.cs", @@ -42,9 +42,6 @@ csharp_library( target_frameworks = [ "netstandard2.0", ], - visibility = [ - "//dotnet:__subpackages__", - ], deps = [ "//dotnet/src/webdriver", framework("nuget", "NETStandard.Library"), @@ -52,13 +49,13 @@ csharp_library( ) nuget_pack( - name = "support-pack", + name = "support", files = { "//common/images:selenium_logo_small.png": "icon.png", }, id = "Selenium.Support", libs = { - ":support": "WebDriver.Support", + ":support-lib": "WebDriver.Support", }, nuspec_template = "WebDriver.Support.nuspec", tags = [ @@ -69,7 +66,7 @@ nuget_pack( ) csharp_library( - name = "support-strongnamed", + name = "support-strongnamed-lib", srcs = glob([ "*.cs", "Events/*.cs", @@ -98,7 +95,7 @@ nuget_pack( }, id = "Selenium.Support.StrongNamed", libs = { - ":support-strongnamed": "WebDriver.Support.StrongNamed", + ":support-strongnamed-lib": "WebDriver.Support.StrongNamed", }, nuspec_template = "WebDriver.Support.StrongNamed.nuspec", tags = [ diff --git a/dotnet/src/webdriver/BUILD.bazel b/dotnet/src/webdriver/BUILD.bazel index ab3dbc786190b..e99b9d3b096ff 100644 --- a/dotnet/src/webdriver/BUILD.bazel +++ b/dotnet/src/webdriver/BUILD.bazel @@ -26,7 +26,7 @@ generated_assembly_info( ) csharp_library( - name = "webdriver", + name = "webdriver-lib", srcs = [ ":assembly-info", ] + glob([ @@ -46,9 +46,6 @@ csharp_library( target_frameworks = [ "netstandard2.0", ], - visibility = [ - "//dotnet:__subpackages__", - ], deps = [ framework("nuget", "NETStandard.Library"), framework("nuget", "Newtonsoft.Json"), @@ -57,7 +54,7 @@ csharp_library( ) csharp_library( - name = "webdriver-strongnamed", + name = "webdriver-strongnamed-lib", srcs = [ ":assembly-info", ] + glob([ @@ -78,9 +75,6 @@ csharp_library( target_frameworks = [ "netstandard2.0", ], - visibility = [ - "//dotnet:__subpackages__", - ], deps = [ framework("nuget", "NETStandard.Library"), framework("nuget", "Newtonsoft.Json"), @@ -107,7 +101,7 @@ copy_file( ) nuget_pack( - name = "webdriver-pack", + name = "webdriver", files = { "//common/images:selenium_logo_small.png": "icon.png", "//common/manager:selenium-manager-linux": "manager/linux/selenium-manager", @@ -119,7 +113,7 @@ nuget_pack( }, id = "Selenium.WebDriver", libs = { - ":webdriver": "WebDriver", + ":webdriver-lib": "WebDriver", }, nuspec_template = "WebDriver.nuspec", tags = [ @@ -132,7 +126,7 @@ nuget_pack( ) nuget_pack( - name = "webdriver-strongnamed-pack", + name = "webdriver-strongnamed", files = { "//common/images:selenium_logo_small.png": "icon.png", "//common/manager:selenium-manager-linux": "manager/linux/selenium-manager", @@ -144,7 +138,7 @@ nuget_pack( }, id = "Selenium.WebDriver.StrongNamed", libs = { - ":webdriver-strongnamed": "WebDriver.StrongNamed", + ":webdriver-strongnamed-lib": "WebDriver.StrongNamed", }, nuspec_template = "WebDriver.StrongNamed.nuspec", property_group_vars = { From ae176d8891b971ebef8af731c9df688783d7d5ff Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Tue, 17 Oct 2023 22:38:47 +0300 Subject: [PATCH 13/16] More reverted changes --- dotnet/BUILD.bazel | 4 ++-- dotnet/src/support/BUILD.bazel | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dotnet/BUILD.bazel b/dotnet/BUILD.bazel index 4d343f42e8d3c..13a56b1506092 100644 --- a/dotnet/BUILD.bazel +++ b/dotnet/BUILD.bazel @@ -16,7 +16,7 @@ pkg_zip( pkg_zip( name = "release", srcs = [ - "//dotnet/src/support:support", - "//dotnet/src/webdriver:webdriver", + "//dotnet/src/support", + "//dotnet/src/webdriver", ], ) diff --git a/dotnet/src/support/BUILD.bazel b/dotnet/src/support/BUILD.bazel index 86f0a9611a2fd..92ac900834729 100644 --- a/dotnet/src/support/BUILD.bazel +++ b/dotnet/src/support/BUILD.bazel @@ -89,7 +89,7 @@ csharp_library( ) nuget_pack( - name = "support-strongnamed-pack", + name = "support-strongnamed", files = { "//common/images:selenium_logo_small.png": "icon.png", }, From dcf8e767f7916951db8ca46236460e8e7d68b291 Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Tue, 17 Oct 2023 22:41:55 +0300 Subject: [PATCH 14/16] Return back framework ref to system.drawing in support package --- dotnet/src/support/WebDriver.Support.StrongNamed.nuspec | 3 +++ dotnet/src/support/WebDriver.Support.nuspec | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec b/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec index 804fef803aee8..9bb2b735fdb26 100644 --- a/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec +++ b/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec @@ -26,6 +26,9 @@ + + + diff --git a/dotnet/src/support/WebDriver.Support.nuspec b/dotnet/src/support/WebDriver.Support.nuspec index 98e90af63214d..be1eace29cfe9 100644 --- a/dotnet/src/support/WebDriver.Support.nuspec +++ b/dotnet/src/support/WebDriver.Support.nuspec @@ -26,6 +26,9 @@ + + + From b93eb91b8f18ca776bb803c66660015fa8052b7d Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Thu, 26 Oct 2023 19:52:42 +0300 Subject: [PATCH 15/16] Fix link to specific tagged version --- dotnet/src/support/WebDriver.Support.StrongNamed.nuspec | 2 +- dotnet/src/support/WebDriver.Support.nuspec | 2 +- dotnet/src/webdriver/WebDriver.StrongNamed.nuspec | 2 +- dotnet/src/webdriver/WebDriver.nuspec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec b/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec index 9bb2b735fdb26..1eb32e19aedcb 100644 --- a/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec +++ b/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec @@ -19,7 +19,7 @@ icon.png selenium webdriver support browser automation - See the latest changes, included in this release, at https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/dotnet/CHANGELOG. + See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/selenium-$version$/dotnet/CHANGELOG. diff --git a/dotnet/src/support/WebDriver.Support.nuspec b/dotnet/src/support/WebDriver.Support.nuspec index be1eace29cfe9..e4d1e778f2301 100644 --- a/dotnet/src/support/WebDriver.Support.nuspec +++ b/dotnet/src/support/WebDriver.Support.nuspec @@ -19,7 +19,7 @@ icon.png selenium webdriver support browser automation - See the latest changes, included in this release, at https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/dotnet/CHANGELOG. + See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/selenium-$version$/dotnet/CHANGELOG. diff --git a/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec b/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec index 8ee7e4254ef5a..57c871ce0c6f8 100644 --- a/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec +++ b/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec @@ -20,7 +20,7 @@ selenium webdriver browser automation README.md - See the latest changes, included in this release, at https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/dotnet/CHANGELOG. + See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/selenium-$version$/dotnet/CHANGELOG. diff --git a/dotnet/src/webdriver/WebDriver.nuspec b/dotnet/src/webdriver/WebDriver.nuspec index 8ee7e4254ef5a..57c871ce0c6f8 100644 --- a/dotnet/src/webdriver/WebDriver.nuspec +++ b/dotnet/src/webdriver/WebDriver.nuspec @@ -20,7 +20,7 @@ selenium webdriver browser automation README.md - See the latest changes, included in this release, at https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/dotnet/CHANGELOG. + See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/selenium-$version$/dotnet/CHANGELOG. From 35ddd4a22b6b639626e292efe9e91453242283ab Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko Date: Thu, 26 Oct 2023 21:15:12 +0300 Subject: [PATCH 16/16] Return back link to trunk --- dotnet/src/support/WebDriver.Support.StrongNamed.nuspec | 2 +- dotnet/src/support/WebDriver.Support.nuspec | 2 +- dotnet/src/webdriver/WebDriver.StrongNamed.nuspec | 2 +- dotnet/src/webdriver/WebDriver.nuspec | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec b/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec index 1eb32e19aedcb..87f2287c52fc2 100644 --- a/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec +++ b/dotnet/src/support/WebDriver.Support.StrongNamed.nuspec @@ -19,7 +19,7 @@ icon.png selenium webdriver support browser automation - See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/selenium-$version$/dotnet/CHANGELOG. + See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG. diff --git a/dotnet/src/support/WebDriver.Support.nuspec b/dotnet/src/support/WebDriver.Support.nuspec index e4d1e778f2301..e8fb33f954b98 100644 --- a/dotnet/src/support/WebDriver.Support.nuspec +++ b/dotnet/src/support/WebDriver.Support.nuspec @@ -19,7 +19,7 @@ icon.png selenium webdriver support browser automation - See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/selenium-$version$/dotnet/CHANGELOG. + See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG. diff --git a/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec b/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec index 57c871ce0c6f8..ce658312f8b5a 100644 --- a/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec +++ b/dotnet/src/webdriver/WebDriver.StrongNamed.nuspec @@ -20,7 +20,7 @@ selenium webdriver browser automation README.md - See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/selenium-$version$/dotnet/CHANGELOG. + See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG. diff --git a/dotnet/src/webdriver/WebDriver.nuspec b/dotnet/src/webdriver/WebDriver.nuspec index 57c871ce0c6f8..ce658312f8b5a 100644 --- a/dotnet/src/webdriver/WebDriver.nuspec +++ b/dotnet/src/webdriver/WebDriver.nuspec @@ -20,7 +20,7 @@ selenium webdriver browser automation README.md - See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/selenium-$version$/dotnet/CHANGELOG. + See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG.