Skip to content

Commit b8fd334

Browse files
authored
Update Selenium version to v4.33.0 +semver:feature (#270)
* Update Selenium version to v4.33.0 +semver:feature * fix review comment * Accept cookies in manytools site * Stabilize Should_BePossibleTo_FindByImage
1 parent 98e293b commit b8fd334

File tree

9 files changed

+31
-18
lines changed

9 files changed

+31
-18
lines changed

Aquality.Selenium/src/Aquality.Selenium.Images/Aquality.Selenium.Images.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
</ItemGroup>
4141
<ItemGroup>
4242
<PackageReference Include="OpenCvSharp4.runtime.osx_arm64" Version="4.8.1-rc" />
43-
<PackageReference Include="OpenCvSharp4" Version="4.10.0.20241108" />
44-
<PackageReference Include="OpenCvSharp4.runtime.linux-arm" Version="4.10.0.20241107" />
43+
<PackageReference Include="OpenCvSharp4" Version="4.11.0.20250507" />
44+
<PackageReference Include="OpenCvSharp4.runtime.linux-arm" Version="4.11.0.20250506" />
4545
<PackageReference Include="OpenCvSharp4.runtime.osx.10.15-x64" Version="4.6.0.20230105" />
46-
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.10.0.20241108" />
46+
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.11.0.20250507" />
4747
<PackageReference Include="OpenCvSharp4_.runtime.ubuntu.20.04-x64" Version="4.10.0.20240616" />
4848
</ItemGroup>
4949

Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
</ItemGroup>
9292

9393
<ItemGroup>
94-
<PackageReference Include="Aquality.Selenium.Core" Version="3.2.1" />
94+
<PackageReference Include="Aquality.Selenium.Core" Version="3.3.0" />
9595
<PackageReference Include="WebDriverManager" Version="2.17.5" />
9696
</ItemGroup>
9797

Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.xml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Aquality.Selenium/src/Aquality.Selenium/Browsers/DevToolsEmulationExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Aquality.Selenium.Core.Utilities;
22
using OpenQA.Selenium.DevTools;
3-
using OpenQA.Selenium.DevTools.V135.DOM;
4-
using OpenQA.Selenium.DevTools.V135.Emulation;
3+
using OpenQA.Selenium.DevTools.V137.DOM;
4+
using OpenQA.Selenium.DevTools.V137.Emulation;
55
using System;
66
using System.Collections.Generic;
77
using System.Linq;

Aquality.Selenium/src/Aquality.Selenium/Browsers/DevToolsPerformanceExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using OpenQA.Selenium.DevTools.V135.Performance;
1+
using OpenQA.Selenium.DevTools.V137.Performance;
22
using System.Collections.Generic;
33
using System.Globalization;
44
using System.Linq;

Aquality.Selenium/tests/Aquality.Selenium.Tests/Aquality.Selenium.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<PrivateAssets>all</PrivateAssets>
3535
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3636
</PackageReference>
37-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
37+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
3838
</ItemGroup>
3939

4040
<ItemGroup>

Aquality.Selenium/tests/Aquality.Selenium.Tests/Integration/DevToolsEmulationTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using Aquality.Selenium.Tests.Integration.TestApp.TheInternet.Forms;
66
using NUnit.Framework;
77
using OpenQA.Selenium;
8-
using OpenQA.Selenium.DevTools.V135.Emulation;
8+
using OpenQA.Selenium.DevTools.V136.Emulation;
99
using System;
1010
using System.Collections.Generic;
1111

@@ -59,11 +59,11 @@ public void Should_BePossibleTo_SetAndClearDeviceMetricsOverride_WithVersionSpec
5959
{
6060
void setAction(long width, long height, bool isMobile, double scaleFactor)
6161
{
62-
var parameters = new OpenQA.Selenium.DevTools.V134.Emulation.SetDeviceMetricsOverrideCommandSettings
62+
var parameters = new OpenQA.Selenium.DevTools.V136.Emulation.SetDeviceMetricsOverrideCommandSettings
6363
{
64-
DisplayFeature = new OpenQA.Selenium.DevTools.V134.Emulation.DisplayFeature
64+
DisplayFeature = new OpenQA.Selenium.DevTools.V136.Emulation.DisplayFeature
6565
{
66-
Orientation = OpenQA.Selenium.DevTools.V134.Emulation.DisplayFeatureOrientationValues.Horizontal
66+
Orientation = OpenQA.Selenium.DevTools.V136.Emulation.DisplayFeatureOrientationValues.Horizontal
6767
},
6868
Width = width,
6969
Height = height,

Aquality.Selenium/tests/Aquality.Selenium.Tests/Integration/ImageLocatorTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ public void Should_BePossibleTo_FindByImage()
2727

2828
var documentByTag = AqualityServices.Get<IElementFactory>().GetLabel(By.TagName("body"), "document by tag");
2929
var fullThreshold = 1;
30-
var documentByImage = AqualityServices.Get<IElementFactory>().GetLabel(new ByImage(documentByTag.GetElement().GetScreenshot().AsByteArray) { Threshold = fullThreshold },
30+
var getDocByImage = () => AqualityServices.Get<IElementFactory>().GetLabel(new ByImage(documentByTag.GetElement().GetScreenshot().AsByteArray) { Threshold = fullThreshold },
3131
"body screen");
32+
ILabel documentByImage = getDocByImage();
33+
AqualityServices.ConditionalWait.WaitForTrue(() =>
34+
{
35+
documentByImage = getDocByImage();
36+
return documentByImage.State.IsDisplayed;
37+
});
3238
Assert.That(documentByImage.State.IsDisplayed, "Should be possible to find element by document screenshot");
3339
Assert.That((documentByImage.Locator as ByImage)?.Threshold, Is.EqualTo(fullThreshold), "Should be possible to get ByImage threshold");
3440
Assert.That(documentByImage.GetElement().TagName, Is.EqualTo("body"), "Correct element must be found");

Aquality.Selenium/tests/Aquality.Selenium.Tests/Integration/TestApp/ManyTools/Forms/ManyToolsForm.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ namespace Aquality.Selenium.Tests.Integration.TestApp.ManyTools.Forms
1010
{
1111
internal abstract class ManyToolsForm<T> : Form where T : ManyToolsForm<T>
1212
{
13-
private const string BaseUrl = "https://manytools.org/";
13+
private const string BaseUrl = "https://manytools.org/";
1414

1515
protected ManyToolsForm(By locator, string name) : base(locator, name)
1616
{
1717
}
18+
private IButton AgreeButton => ElementFactory.GetButton(By.XPath("//button[@mode='primary']"), "Agree");
1819
private ILabel ValueLabel => FormElement.FindChildElement<ILabel>(By.XPath(".//code"), Name);
1920

2021
protected abstract string UrlPart { get; }
@@ -29,6 +30,12 @@ public T Open()
2930
{
3031
AqualityServices.Browser.GoTo(Url);
3132
AqualityServices.Browser.WaitForPageToLoad();
33+
State.WaitForDisplayed();
34+
if (AgreeButton.State.IsDisplayed)
35+
{
36+
AgreeButton.Click();
37+
AgreeButton.State.WaitForNotDisplayed();
38+
}
3239
}, new List<Type> { typeof(WebDriverTimeoutException) });
3340

3441
return (T)this;

0 commit comments

Comments
 (0)