Skip to content

Commit

Permalink
Add Aquality.Selenium.Images package to separate OpenCV dependency (#264
Browse files Browse the repository at this point in the history
) +semver: feature

* Add Aquality.Selenium.Images package to separate OpenCV dependency  +semver: feature
Update to Selenium 4.25.0
* Rename namespace to match new package name
* update the pipeline
  • Loading branch information
mialeska authored Oct 9, 2024
1 parent 824634f commit 624ba3c
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 66 deletions.
11 changes: 9 additions & 2 deletions Aquality.Selenium/Aquality.Selenium.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29009.5
# Visual Studio Version 17
VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{43453468-EBA2-4800-B6CA-765FA722BA61}"
EndProject
Expand All @@ -11,6 +11,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Aquality.Selenium.Tests", "
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{999ED05C-B034-45A1-8F11-2B519C308250}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aquality.Selenium.Images", "src\Aquality.Selenium.Images\Aquality.Selenium.Images.csproj", "{72EB3821-6AB9-465C-9B88-D878D677C754}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -25,13 +27,18 @@ Global
{856AE8E1-31EF-49A1-B6EB-C72BF12432F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{856AE8E1-31EF-49A1-B6EB-C72BF12432F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{856AE8E1-31EF-49A1-B6EB-C72BF12432F8}.Release|Any CPU.Build.0 = Release|Any CPU
{72EB3821-6AB9-465C-9B88-D878D677C754}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72EB3821-6AB9-465C-9B88-D878D677C754}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72EB3821-6AB9-465C-9B88-D878D677C754}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72EB3821-6AB9-465C-9B88-D878D677C754}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B0E3FDB8-CF47-40D2-AC0E-FB12F66D1F26} = {43453468-EBA2-4800-B6CA-765FA722BA61}
{856AE8E1-31EF-49A1-B6EB-C72BF12432F8} = {999ED05C-B034-45A1-8F11-2B519C308250}
{72EB3821-6AB9-465C-9B88-D878D677C754} = {43453468-EBA2-4800-B6CA-765FA722BA61}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0AC8C847-FF57-4A72-8E22-F0947E17DFAF}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<Authors>aquality automation committers</Authors>
<Company>aquality automation</Company>
<Description>Support classes to work with Images in Aquality.Selenium, such as ByImage locator</Description>
<PackageDescription>Support classes to work with Images in Aquality.Selenium, such as ByImage locator</PackageDescription>
<PackageLicenseExpression></PackageLicenseExpression>
<RepositoryUrl>https://github.com/aquality-automation/aquality-selenium-dotnet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>selenium webdriver browser automation image locator</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright 2024 Aquality Automation</Copyright>
<IsPackable>true</IsPackable>
</PropertyGroup>

<PropertyGroup>
<DocumentationFile>Aquality.Selenium.Images.xml</DocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Aquality.Selenium\Aquality.Selenium.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\README.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="OpenCvSharp4.runtime.osx_arm64" Version="4.8.1-rc" />
<PackageReference Include="OpenCvSharp4" Version="4.10.0.20240616" />
<PackageReference Include="OpenCvSharp4.runtime.linux-arm" Version="4.10.0.20240616" />
<PackageReference Include="OpenCvSharp4.runtime.osx.10.15-x64" Version="4.6.0.20230105" />
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.10.0.20240616" />
<PackageReference Include="OpenCvSharp4_.runtime.ubuntu.20.04-x64" Version="4.10.0.20240616" />
</ItemGroup>

</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System.IO;
using System.Linq;

namespace Aquality.Selenium.Elements.Interfaces
namespace Aquality.Selenium.Images.Locators
{
/// <summary>
/// Locator to search elements by image.
Expand Down
13 changes: 6 additions & 7 deletions Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<RepositoryType>git</RepositoryType>
<PackageTags>selenium webdriver browser automation</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Copyright>Copyright 2024 Aquality Automation</Copyright>
<IsPackable>true</IsPackable>
</PropertyGroup>
Expand Down Expand Up @@ -41,6 +42,10 @@
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\..\README.md">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -86,14 +91,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Aquality.Selenium.Core" Version="3.1.1" />
<PackageReference Include="OpenCvSharp4.runtime.osx_arm64" Version="4.8.1-rc" />
<PackageReference Include="Aquality.Selenium.Core" Version="3.1.2" />
<PackageReference Include="WebDriverManager" Version="2.17.4" />
<PackageReference Include="OpenCvSharp4" Version="4.10.0.20240616" />
<PackageReference Include="OpenCvSharp4.runtime.linux-arm" Version="4.10.0.20240616" />
<PackageReference Include="OpenCvSharp4.runtime.osx.10.15-x64" Version="4.6.0.20230105" />
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.10.0.20240616" />
<PackageReference Include="OpenCvSharp4_.runtime.ubuntu.20.04-x64" Version="4.10.0.20240616" />
</ItemGroup>

</Project>
50 changes: 0 additions & 50 deletions Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Aquality.Selenium.Images\Aquality.Selenium.Images.csproj" />
<ProjectReference Include="..\..\src\Aquality.Selenium\Aquality.Selenium.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public void Should_BePossibleTo_SetAndClearDeviceMetricsOverride_WithVersionSpec
{
void setAction(long width, long height, bool isMobile, double scaleFactor)
{
var parameters = new OpenQA.Selenium.DevTools.V128.Emulation.SetDeviceMetricsOverrideCommandSettings
var parameters = new OpenQA.Selenium.DevTools.V129.Emulation.SetDeviceMetricsOverrideCommandSettings
{
DisplayFeature = new OpenQA.Selenium.DevTools.V128.Emulation.DisplayFeature
DisplayFeature = new OpenQA.Selenium.DevTools.V129.Emulation.DisplayFeature
{
Orientation = OpenQA.Selenium.DevTools.V128.Emulation.DisplayFeatureOrientationValues.Horizontal
Orientation = OpenQA.Selenium.DevTools.V129.Emulation.DisplayFeatureOrientationValues.Horizontal
},
Width = width,
Height = height,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Aquality.Selenium.Browsers;
using Aquality.Selenium.Elements.Interfaces;
using Aquality.Selenium.Images.Locators;
using Aquality.Selenium.Tests.Integration.TestApp.TheInternet.Forms;
using NUnit.Framework;
using OpenQA.Selenium;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal class ChromeDownloadsForm : Form
{
private const string Address = "chrome://downloads/";

public static By NestedShadowRootLocator => By.Id("moreActionsMenu");
public static By NestedShadowRootLocator => By.CssSelector("cr-toolbar");
public ILabel DownloadsToolbarLabel => FormElement.FindElementInShadowRoot<ILabel>(By.CssSelector("downloads-toolbar"), "Downloads toolbar");
public IList<ILabel> DivElementLabels => FormElement.FindElementsInShadowRoot<ILabel>(By.CssSelector("div"), "div");
public IList<ILabel> MainContainerLabels => FormElement.FindElementsInShadowRoot<ILabel>(By.Id("mainContainer"), "main container");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.IO;
using System;
using System.Collections.Generic;
using Aquality.Selenium.Images.Locators;

namespace Aquality.Selenium.Tests.Integration.TestApp.TheInternet.Forms
{
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ stages:
useConfigFile: true
configFilePath: 'GitVersion.yml'

- script: dotnet pack Aquality.Selenium\src\Aquality.Selenium\Aquality.Selenium.csproj -c $(buildConfiguration) -p:Version=$(GitVersion.NuGetVersion) -o $(Build.ArtifactStagingDirectory)
- script: dotnet pack Aquality.Selenium\Aquality.Selenium.sln -c $(buildConfiguration) -p:Version=$(GitVersion.NuGetVersion) -o $(Build.ArtifactStagingDirectory)
displayName: 'Pack to NuGet package'

- task: GitHubRelease@0
Expand Down

0 comments on commit 624ba3c

Please sign in to comment.