Skip to content

Commit

Permalink
Update package versions and change target frameworks (#38) +semver:br…
Browse files Browse the repository at this point in the history
…eaking

* Update package versions and change target frameworks
- Update to Appium.WebDriver v.5.0.0-rc-7 and Selenium v.4.19.0. Use version range
- Change target frameworks to be .NET 6 and .NET 4.8 instead of .NET Standard
- Update Copyright year in csproj and in License

* Migrate to .NET 8.0

* add a method to terminate specific applications by their bundle identifier
  • Loading branch information
mialeska authored Apr 19, 2024
1 parent 14fa3b7 commit 1b69013
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Aquality.Selenium.Core.Localization;
using OpenQA.Selenium;
using OpenQA.Selenium.Appium;
using OpenQA.Selenium.Appium.Interfaces;
using OpenQA.Selenium.Appium.Service;
using System;

Expand Down Expand Up @@ -56,5 +57,10 @@ public void Quit()
Driver?.Quit();
DriverService?.Dispose();
}

public bool TerminateApp(string bundleId)
{
return ((IInteractsWithApps)Driver).TerminateApp(bundleId);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ public interface IMobileApplication : IApplication
/// </summary>
void Quit();

/// <summary>
/// Terminate the particular application if it is running.
/// </summary>
/// <param name="bundleId">the bundle identifier (or app id) of the app to be terminated.</param>
/// <returns>true if the app was running before and has been successfully stopped.</returns>
bool TerminateApp(string bundleId);

/// <summary>
/// Provides current AppiumDriver service instance (would be null if driver is not local).
/// </summary>
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;net6.0</TargetFrameworks>

<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand All @@ -14,7 +14,7 @@
<RepositoryType>git</RepositoryType>
<PackageTags>appium mobile ios android automation</PackageTags>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Copyright>Copyright 2023 Aquality Automation</Copyright>
<Copyright>Copyright 2024 Aquality Automation</Copyright>
<IsPackable>true</IsPackable>
</PropertyGroup>

Expand Down Expand Up @@ -49,8 +49,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Appium.WebDriver" Version="5.0.0-rc.2" />
<PackageReference Include="Aquality.Selenium.Core" Version="3.0.5" />
<PackageReference Include="Appium.WebDriver" Version="[5.0.0-rc.7, 5.0.0]" />
<PackageReference Include="Aquality.Selenium.Core" Version="[3.0.7, 4.0.0)" />
</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
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>

<IsPackable>false</IsPackable>
Expand All @@ -13,7 +13,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 Aquality Automation
Copyright 2024 Aquality Automation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
13 changes: 7 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ stages:
sonar.coverage.exclusions=**/**
- task: UseDotNet@2
displayName: Use .NET 6.0
displayName: Use .NET 8.0
inputs:
packageType: 'sdk'
version: '6.0.x'
version: '8.0.x'

- task: DotNetCoreCLI@2
displayName: 'Build solution'
Expand Down Expand Up @@ -118,13 +118,14 @@ stages:
condition: and(succeeded(), eq(variables['isRemote'], 'true'))

- task: UseDotNet@2
displayName: Use .NET 6.0
displayName: Use .NET 8.0
inputs:
packageType: 'sdk'
version: '6.0.x'
version: '8.0.x'

- task: DotNetCoreCLI@2
displayName: 'Run tests'
retryCountOnTaskFailure: 1
inputs:
command: 'test'
projects: '**/*Tests*/*.csproj'
Expand Down Expand Up @@ -157,10 +158,10 @@ stages:

steps:
- task: UseDotNet@2
displayName: Use .NET 6.0
displayName: Use .NET 8.0
inputs:
packageType: 'sdk'
version: '6.0.x'
version: '8.0.x'

- task: gitversion/setup@0
displayName: 'Install GitTools'
Expand Down

0 comments on commit 1b69013

Please sign in to comment.