Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Aquality.Selenium.Core" Version="3.4.0" />
<PackageReference Include="Aquality.Selenium.Core" Version="3.5.0" />
<PackageReference Include="WebDriverManager" Version="2.17.6" />
</ItemGroup>

Expand Down
8 changes: 0 additions & 8 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 @@ -74,21 +74,6 @@ public DevToolsSession GetDevToolsSession()
return session;
}

/// <summary>
/// Creates a session to communicate with a browser using the Chromium Developer Tools debugging protocol.
/// </summary>
/// <param name="protocolVersion">The version of the Chromium Developer Tools protocol to use.
/// Defaults to autodetect the protocol version for <see cref="ChromiumDriver"/>, V85 for FirefoxDriver.</param>
/// <returns>The active session to use to communicate with the Chromium Developer Tools debugging protocol.</returns>
[Obsolete("Use GetDevToolsSession(DevToolsOptions options)")]
public DevToolsSession GetDevToolsSession(int protocolVersion)
{
Logger.Info("loc.browser.devtools.session.get", protocolVersion);
var session = devToolsProvider.GetDevToolsSession(protocolVersion);
wasDevToolsSessionClosed = false;
return session;
}

/// <summary>
/// Creates a session to communicate with a browser using the Chromium Developer Tools debugging protocol.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="nunit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0">
<PackageReference Include="nunit" Version="4.4.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public void Should_BePossibleTo_SwitchToNewByHandle_AndClose()
});
}

[Test]
[Test, Category(RetriesGroup), Retry(RetriesCount)]
public void Should_BePossibleTo_SwitchToNewByIndex()
{
CheckSwitchingBy(3, () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void Should_BePossibleTo_ExecuteJavaScript()
Assert.That(currentUrl, Is.EqualTo(dynamicContentForm.Url));
}

[Test]
[Test, Category(RetriesGroup), Retry(RetriesCount)]
public void Should_BePossibleTo_ExecuteAsyncJavaScript()
{
const int expectedDurationInSeconds = 1;
Expand Down Expand Up @@ -226,7 +226,7 @@ public void Should_BePossibleTo_GetBrowserName()
Assert.That(AqualityServices.Browser.BrowserName, Is.EqualTo(browserName));
}

[Test]
[Test, Category(RetriesGroup), Retry(RetriesCount)]
public void Should_BePossibleTo_SetImplicitWait()
{
var browser = AqualityServices.Browser;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Aquality.Selenium.Tests.Integration.TestApp.TheInternet.Forms;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.DevTools.V136.Emulation;
using OpenQA.Selenium.DevTools.V139.Emulation;
using System;
using System.Collections.Generic;

Expand Down 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.V136.Emulation.SetDeviceMetricsOverrideCommandSettings
var parameters = new OpenQA.Selenium.DevTools.V138.Emulation.SetDeviceMetricsOverrideCommandSettings
{
DisplayFeature = new OpenQA.Selenium.DevTools.V136.Emulation.DisplayFeature
DisplayFeature = new OpenQA.Selenium.DevTools.V138.Emulation.DisplayFeature
{
Orientation = OpenQA.Selenium.DevTools.V136.Emulation.DisplayFeatureOrientationValues.Horizontal
Orientation = OpenQA.Selenium.DevTools.V138.Emulation.DisplayFeatureOrientationValues.Horizontal
},
Width = width,
Height = height,
Expand Down Expand Up @@ -93,7 +93,7 @@ private static void CheckDeviceMetricsOverride(Action<long, long, bool, double>
Assert.That(getWindowHeight(), Is.EqualTo(initialValue), "Browser height should match to initial value after clear");
}

[Test]
[Test, Category(RetriesGroup), Retry(RetriesCount)]
public void Should_BePossibleTo_SetAndClearGeoLocationOverride()
{
CheckGeolocationOverride(
Expand All @@ -102,7 +102,7 @@ public void Should_BePossibleTo_SetAndClearGeoLocationOverride()
() => Assert.DoesNotThrowAsync(async () => await DevTools.ClearGeolocationOverride(), "Should be possible to clear geoLocation"));
}

[Test]
[Test, Category(RetriesGroup), Retry(RetriesCount)]
public void Should_BePossibleTo_SetAndClearGeoLocationOverride_ByExecutingCdpCommand()
{
CheckGeolocationOverride(
Expand Down Expand Up @@ -144,7 +144,7 @@ private static void CheckGeolocationOverride(Action<double?, double?, double?> s
Assert.That(locationForm.Longitude, Is.EqualTo(defaultLongitude), "Longitude should match to default");
}

[Test]
[Test, Category(RetriesGroup), Retry(RetriesCount)]
public void Should_BePossibleTo_SetUserAgentAndLanguageOverride()
{
var defaultLanguage = new BrowserLanguageForm().Open().Value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void Should_BePossibleTo_SelectAll()
Assert.That(selectMultipleForm.ValuesFromResult, Is.EqualTo(selected));
}

[Test]
[Test, Category(RetriesGroup), Retry(RetriesCount)]
public void Should_BePossibleTo_DeselectByValue()
{
var valuesToRemove = new List<string> { "volvo", "saab" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void Should_BePossibleTo_CheckThatHiddenElementsExist(
});
}

[Test]
[Test, Category(RetriesGroup), Retry(RetriesCount)]
public void Should_BePossibleTo_CheckThatHiddenElementsNotDisplayed(
[ValueSource(nameof(ElementListProviders))] Func<ElementState, ElementsCount, IList<ILabel>> elementListProvider)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal class ImageLocatorTests : UITest
{
private readonly BrokenImagesForm form = new();

[Test]
[Test, Category(RetriesGroup), Retry(RetriesCount)]
public void Should_BePossibleTo_FindByImage()
{
new CheckBoxesForm().Open();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ namespace Aquality.Selenium.Tests.Integration
[Parallelizable(ParallelScope.All)]
internal class UITest
{
protected const int RetriesCount = 5;
protected const string RetriesGroup = "Flaky";

[TearDown]
public void CleanUp()
{
Expand Down
Loading