Skip to content

Commit

Permalink
Update to Appium 5.1.0, Selenium 4.23.0 (#58) +semver:feature
Browse files Browse the repository at this point in the history
* Update to Appium 5.1.0, Selenium 4.23.0 +semver:feature
use .NET 8 / 4.8 instead of .NET standard

* Update downloads tab name in tests after recent Chrome update

* Stabilize Chrome tests, add retry to pipeline and update SonarQube task configurations
  • Loading branch information
mialeska authored Aug 2, 2024
1 parent e2bb72c commit fe3d14c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public void Click(int? x = null, int? y = null, MouseButton? button = null, ILis
{
parameters.Add("interClickDelayMs", interClickDelay?.TotalMilliseconds);
}
Point cursor;
Point cursor = default;
if (x == null || y == null)
{
cursor = Coordinates;
Expand Down Expand Up @@ -142,7 +142,7 @@ public void Hover(int startX, int startY, int? endX = null, int? endY = null, IL
public void Scroll(int delta, int? x = null, int? y = null, ScrollDirection direction = ScrollDirection.Vertical, IList<ModifierKey> modifierKeys = null)
{
var parameters = ResolveParameters(modifierKeys);
Point cursor;
Point cursor = default;
if (x == null || y == null)
{
cursor = Coordinates;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>net48;net8.0</TargetFrameworks>

<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down Expand Up @@ -45,8 +45,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.2" />
<PackageReference Include="Aquality.Selenium.Core" Version="3.0.6" />
<PackageReference Include="Appium.WebDriver" Version="5.1.0" />
<PackageReference Include="Aquality.Selenium.Core" Version="3.0.12" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Aquality.WinAppDriver.Actions;
using Aquality.Selenium.Core.Configurations;
using Aquality.WinAppDriver.Actions;
using Aquality.WinAppDriver.Applications;
using Aquality.WinAppDriver.Elements.Interfaces;
using Aquality.WinAppDriver.Forms;
using OpenQA.Selenium;
Expand Down Expand Up @@ -32,7 +34,7 @@ public void DontSignIn()
public void ClosePopUps()
{
State.WaitForExist();
if (NoThanksButton.State.IsExist)
if (!NoThanksButton.State.WaitForNotDisplayed())
{
NoThanksButton.Click();
NoThanksButton.State.WaitForNotDisplayed();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class MultipleWindowsTest : TestWithCustomApplication
: Path.Combine(ProgramFiles, AppPathRelativeFromProgramFiles);

private static string NewTabName => $"New Tab{TabNamePostfix}";
private static string DownloadsTabName => $"Downloads{TabNamePostfix}";
private static string DownloadsTabName => $"Download history{TabNamePostfix}";

private const string TabNamePostfix = " - Google Chrome";

Expand Down
14 changes: 10 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ stages:
displayName: Analyse code with SonarQube

steps:
- task: SonarCloudPrepare@1
- task: SonarCloudPrepare@2
displayName: 'Prepare SonarCloud analysis'
inputs:
SonarCloud: 'SonarCloud'
organization: 'aqualityautomation'
scannerMode: 'MSBuild'
projectKey: 'aquality-automation_aquality-winappdriver-dotnet'
projectName: 'aquality-winappdriver-dotnet'
projectVersion: '$(Build.BuildNumber)'
Expand All @@ -33,12 +34,16 @@ stages:
projects: Aquality.WinAppDriver/Aquality.WinAppDriver.sln
arguments: -c $(buildConfiguration)

- task: SonarCloudAnalyze@1
- task: SonarCloudAnalyze@2
displayName: 'Run SonarCloud code analysis'
continueOnError: true
inputs:
jdkversion: 'JAVA_HOME_17_X64'

- task: SonarCloudPublish@1
- task: SonarCloudPublish@2
displayName: 'Publish SonarCloud quality gate results'
inputs:
pollingTimeoutSec: '300'

- job: tests
displayName: Run tests
Expand Down Expand Up @@ -96,6 +101,7 @@ stages:
- task: DotNetCoreCLI@2
displayName: 'Run tests'
retryCountOnTaskFailure: 1
inputs:
command: 'test'
projects: '**/*Tests*/*.csproj'
Expand Down Expand Up @@ -139,4 +145,4 @@ stages:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/Aquality.WinAppDriver*.nupkg;!$(Build.ArtifactStagingDirectory)/**/Aquality.WinAppDriver*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet'
publishFeedCredentials: 'NuGet'

0 comments on commit fe3d14c

Please sign in to comment.