Skip to content

Commit 4434e02

Browse files
[dotnet] Improve nuget packages metadata (#12873)
* Add more nuget package metainfo * Adjust bazel target names * Hack to make bazel + nuget work on GitHub actions linux+macos * Fix csproj to work with new assets folder * Fix CI .NET Build flow * Make build of support lib visible upstream * Run all tests on github actions * Fix reference to target file in tests project * Return back framework ref to system.drawing in support package * Fix link to specific tagged version * Return back link to trunk --------- Co-authored-by: Titus Fortner <titusfortner@users.noreply.github.com>
1 parent 8abdedd commit 4434e02

11 files changed

Lines changed: 69 additions & 58 deletions

dotnet/src/support/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ csharp_library(
5151
nuget_pack(
5252
name = "support",
5353
files = {
54-
"//common/images:selenium_logo_small.png": "images/icon.png",
54+
"//common/images:selenium_logo_small.png": "icon.png",
5555
},
5656
id = "Selenium.Support",
5757
libs = {
@@ -91,7 +91,7 @@ csharp_library(
9191
nuget_pack(
9292
name = "support-strongnamed",
9393
files = {
94-
"//common/images:selenium_logo_small.png": "images/icon.png",
94+
"//common/images:selenium_logo_small.png": "icon.png",
9595
},
9696
id = "Selenium.Support.StrongNamed",
9797
libs = {

dotnet/src/support/WebDriver.Support.StrongNamed.nuspec

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,23 @@
44
<id>$packageid$</id>
55
<version>$version$</version>
66
<authors>Selenium Committers</authors>
7-
<copyright>Copyright © 2020 Software Freedom Conservancy</copyright>
7+
<copyright>Copyright © 2023 Software Freedom Conservancy</copyright>
88
<owners>selenium</owners>
99
<title>WebDriver Support</title>
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<summary>Provides support classes for Selenium WebDriver</summary>
1212
<description>
13-
Selenium is a set of different software tools each with a different approach
14-
to supporting browser automation. These tools are highly flexible, allowing
15-
many options for locating and manipulating elements within a browser, and one
16-
of its key features is the support for automating multiple browser platforms.
17-
This package contains .NET support utilites and classes that users may find
18-
useful in using Selenium WebDriver. These support classes are mainly intended
19-
to spark ideas of what is possible with Selenium WebDriver, and may not be
20-
entirely appropriate for production use.
13+
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.
2114
</description>
2215
<projectUrl>https://selenium.dev</projectUrl>
23-
<repository url="https://github.com/SeleniumHQ/selenium" />
16+
<repository type="GitHub" url="https://github.com/SeleniumHQ/selenium" />
2417
<license type="expression">Apache-2.0</license>
2518
<iconUrl>https://selenium.dev/images/selenium_logo_square_green.png</iconUrl>
26-
<icon>images\icon.png</icon>
19+
<icon>icon.png</icon>
2720
<tags>selenium webdriver support browser automation</tags>
21+
<releaseNotes>
22+
See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG.
23+
</releaseNotes>
2824
<dependencies>
2925
<group targetFramework="netstandard2.0">
3026
<dependency id="Selenium.WebDriver.StrongNamed" version="$version$" exclude="Build,Analyzers" />

dotnet/src/support/WebDriver.Support.nuspec

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,23 @@
44
<id>$packageid$</id>
55
<version>$version$</version>
66
<authors>Selenium Committers</authors>
7-
<copyright>Copyright © 2020 Software Freedom Conservancy</copyright>
7+
<copyright>Copyright © 2023 Software Freedom Conservancy</copyright>
88
<owners>selenium</owners>
99
<title>WebDriver Support</title>
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<summary>Provides support classes for Selenium WebDriver</summary>
1212
<description>
13-
Selenium is a set of different software tools each with a different approach
14-
to supporting browser automation. These tools are highly flexible, allowing
15-
many options for locating and manipulating elements within a browser, and one
16-
of its key features is the support for automating multiple browser platforms.
17-
This package contains .NET support utilites and classes that users may find
18-
useful in using Selenium WebDriver. These support classes are mainly intended
19-
to spark ideas of what is possible with Selenium WebDriver, and may not be
20-
entirely appropriate for production use.
13+
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.
2114
</description>
2215
<projectUrl>https://selenium.dev</projectUrl>
23-
<repository url="https://github.com/SeleniumHQ/selenium" />
16+
<repository type="GitHub" url="https://github.com/SeleniumHQ/selenium" />
2417
<license type="expression">Apache-2.0</license>
2518
<iconUrl>https://selenium.dev/images/selenium_logo_square_green.png</iconUrl>
26-
<icon>images\icon.png</icon>
19+
<icon>icon.png</icon>
2720
<tags>selenium webdriver support browser automation</tags>
21+
<releaseNotes>
22+
See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG.
23+
</releaseNotes>
2824
<dependencies>
2925
<group targetFramework="netstandard2.0">
3026
<dependency id="Selenium.WebDriver" version="$version$" exclude="Build,Analyzers" />

dotnet/src/webdriver/BUILD.bazel

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,32 @@ csharp_library(
8282
],
8383
)
8484

85+
copy_file(
86+
name = "readme",
87+
src = "//dotnet/src/webdriver/assets:README.md",
88+
out = "README.md",
89+
)
90+
8591
copy_file(
8692
name = "props",
87-
src = "//dotnet/src/webdriver/build:Selenium.WebDriver.targets",
93+
src = "//dotnet/src/webdriver/assets:Selenium.WebDriver.targets",
8894
out = "Selenium.WebDriver.targets",
8995
)
9096

9197
copy_file(
9298
name = "transitive-props",
93-
src = "//dotnet/src/webdriver/build:Selenium.WebDriver.targets",
99+
src = "//dotnet/src/webdriver/assets:Selenium.WebDriver.targets",
94100
out = "transitive.Selenium.WebDriver.targets",
95101
)
96102

97103
nuget_pack(
98104
name = "webdriver",
99105
files = {
100-
"//common/images:selenium_logo_small.png": "images/icon.png",
106+
"//common/images:selenium_logo_small.png": "icon.png",
101107
"//common/manager:selenium-manager-linux": "manager/linux/selenium-manager",
102108
"//common/manager:selenium-manager-macos": "manager/macos/selenium-manager",
103109
"//common/manager:selenium-manager-windows": "manager/windows/selenium-manager.exe",
110+
":readme": "README.md",
104111
":props": "build/Selenium.WebDriver.targets",
105112
":transitive-props": "buildTransitive/Selenium.WebDriver.targets",
106113
},
@@ -121,10 +128,11 @@ nuget_pack(
121128
nuget_pack(
122129
name = "webdriver-strongnamed",
123130
files = {
124-
"//common/images:selenium_logo_small.png": "images/icon.png",
131+
"//common/images:selenium_logo_small.png": "icon.png",
125132
"//common/manager:selenium-manager-linux": "manager/linux/selenium-manager",
126133
"//common/manager:selenium-manager-macos": "manager/macos/selenium-manager",
127134
"//common/manager:selenium-manager-windows": "manager/windows/selenium-manager.exe",
135+
":readme": "README.md",
128136
":props": "build/Selenium.WebDriver.StrongNamed.targets",
129137
":transitive-props": "buildTransitive/Selenium.WebDriver.StrongNamed.targets",
130138
},

dotnet/src/webdriver/WebDriver.StrongNamed.nuspec

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,24 @@
44
<id>$packageid$</id>
55
<version>$version$</version>
66
<authors>Selenium Committers</authors>
7-
<copyright>Copyright © 2020 Software Freedom Conservancy</copyright>
7+
<copyright>Copyright © 2023 Software Freedom Conservancy</copyright>
88
<owners>selenium</owners>
99
<title>Selenium WebDriver</title>
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<summary>.NET bindings for the Selenium WebDriver API</summary>
1212
<description>
13-
Selenium is a set of different software tools each with a different approach
14-
to supporting browser automation. These tools are highly flexible, allowing
15-
many options for locating and manipulating elements within a browser, and one
16-
of its key features is the support for automating multiple browser platforms.
17-
This package contains the .NET bindings for the concise and object-based
18-
Selenium WebDriver API, which uses native OS-level events to manipulate the
19-
browser, bypassing the JavaScript sandbox, and does not require the Selenium
20-
Server to automate the browser.
13+
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.
2114
</description>
2215
<projectUrl>https://selenium.dev</projectUrl>
23-
<repository url="https://github.com/SeleniumHQ/selenium" />
16+
<repository type="GitHub" url="https://github.com/SeleniumHQ/selenium" />
2417
<license type="expression">Apache-2.0</license>
2518
<iconUrl>https://selenium.dev/images/selenium_logo_square_green.png</iconUrl>
26-
<icon>images\icon.png</icon>
19+
<icon>icon.png</icon>
2720
<tags>selenium webdriver browser automation</tags>
21+
<readme>README.md</readme>
22+
<releaseNotes>
23+
See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG.
24+
</releaseNotes>
2825
<dependencies>
2926
<group targetFramework="netstandard2.0">
3027
<dependency id="Newtonsoft.Json" version="13.0.1" exclude="Build,Analyzers" />

dotnet/src/webdriver/WebDriver.csproj

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,16 @@
9393

9494
<PropertyGroup>
9595
<BaseSeleniumManagerPath>..\..\..\common\manager</BaseSeleniumManagerPath>
96-
</PropertyGroup>
97-
98-
<PropertyGroup>
9996
<BaseImagePath>..\..\..\common\images</BaseImagePath>
10097
</PropertyGroup>
10198

10299
<ItemGroup>
103-
<None Include="build\Selenium.WebDriver.targets" Pack="true" PackagePath="build\" />
104-
<None Include="build\Selenium.WebDriver.targets" Pack="true" PackagePath="buildTransitive\" />
100+
<None Include="assets\Selenium.WebDriver.targets" Pack="true" PackagePath="build\" />
101+
<None Include="assets\Selenium.WebDriver.targets" Pack="true" PackagePath="buildTransitive\" />
105102

106-
<None Include="$(BaseImagePath)\selenium_logo_small.png" Pack="true" PackagePath="\logo.png" Visible="false" />
103+
<None Include="$(BaseImagePath)\selenium_logo_small.png" Pack="true" PackagePath="logo.png" Visible="false" />
107104

108-
<None Include="$(BaseSeleniumManagerPath)\linux\selenium-manager" Pack="true" PackagePath="\manager\linux" Visible="false" />
105+
<None Include="$(BaseSeleniumManagerPath)\linux\selenium-manager" Pack="true" PackagePath="manager\linux" Visible="false" />
109106
<None Include="$(BaseSeleniumManagerPath)\macos\selenium-manager" Pack="true" PackagePath="manager\macos" Visible="false" />
110107
<None Include="$(BaseSeleniumManagerPath)\windows\selenium-manager.exe" Pack="true" PackagePath="manager\windows" Visible="false" />
111108
</ItemGroup>

dotnet/src/webdriver/WebDriver.nuspec

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,24 @@
44
<id>$packageid$</id>
55
<version>$version$</version>
66
<authors>Selenium Committers</authors>
7-
<copyright>Copyright © 2020 Software Freedom Conservancy</copyright>
7+
<copyright>Copyright © 2023 Software Freedom Conservancy</copyright>
88
<owners>selenium</owners>
99
<title>Selenium WebDriver</title>
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<summary>.NET bindings for the Selenium WebDriver API</summary>
1212
<description>
13-
Selenium is a set of different software tools each with a different approach
14-
to supporting browser automation. These tools are highly flexible, allowing
15-
many options for locating and manipulating elements within a browser, and one
16-
of its key features is the support for automating multiple browser platforms.
17-
This package contains the .NET bindings for the concise and object-based
18-
Selenium WebDriver API, which uses native OS-level events to manipulate the
19-
browser, bypassing the JavaScript sandbox, and does not require the Selenium
20-
Server to automate the browser.
13+
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.
2114
</description>
2215
<projectUrl>https://selenium.dev</projectUrl>
23-
<repository url="https://github.com/SeleniumHQ/selenium" />
16+
<repository type="GitHub" url="https://github.com/SeleniumHQ/selenium" />
2417
<license type="expression">Apache-2.0</license>
2518
<iconUrl>https://selenium.dev/images/selenium_logo_square_green.png</iconUrl>
26-
<icon>images\icon.png</icon>
19+
<icon>icon.png</icon>
2720
<tags>selenium webdriver browser automation</tags>
21+
<readme>README.md</readme>
22+
<releaseNotes>
23+
See the latest changes, included in this release, at https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG.
24+
</releaseNotes>
2825
<dependencies>
2926
<group targetFramework="netstandard2.0">
3027
<dependency id="Newtonsoft.Json" version="13.0.1" exclude="Build,Analyzers" />
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
exports_files([
2+
"README.md",
23
"Selenium.WebDriver.targets",
34
])
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
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.
2+
3+
# Usage
4+
5+
```csharp
6+
using OpenQA.Selenium.Chrome;
7+
using OpenQA.Selenium;
8+
9+
var driver = new ChromeDriver();
10+
11+
driver.Url = "https://www.google.com";
12+
driver.FindElement(By.Name("q")).SendKeys("webdriver" + Keys.Return);
13+
Console.WriteLine(driver.Title);
14+
15+
driver.Quit();
16+
```
17+
18+
# Contributing
19+
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).

dotnet/src/webdriver/build/Selenium.WebDriver.targets renamed to dotnet/src/webdriver/assets/Selenium.WebDriver.targets

File renamed without changes.

0 commit comments

Comments
 (0)