diff --git a/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Applications/Application.cs b/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Applications/Application.cs
index 7026427..5f5ab15 100644
--- a/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Applications/Application.cs
+++ b/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Applications/Application.cs
@@ -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;
@@ -56,5 +57,10 @@ public void Quit()
Driver?.Quit();
DriverService?.Dispose();
}
+
+ public bool TerminateApp(string bundleId)
+ {
+ return ((IInteractsWithApps)Driver).TerminateApp(bundleId);
+ }
}
}
diff --git a/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Applications/IMobileApplication.cs b/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Applications/IMobileApplication.cs
index bb7199e..3ca526b 100644
--- a/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Applications/IMobileApplication.cs
+++ b/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Applications/IMobileApplication.cs
@@ -19,6 +19,13 @@ public interface IMobileApplication : IApplication
///
void Quit();
+ ///
+ /// Terminate the particular application if it is running.
+ ///
+ /// the bundle identifier (or app id) of the app to be terminated.
+ /// true if the app was running before and has been successfully stopped.
+ bool TerminateApp(string bundleId);
+
///
/// Provides current AppiumDriver service instance (would be null if driver is not local).
///
diff --git a/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Aquality.Appium.Mobile.csproj b/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Aquality.Appium.Mobile.csproj
index e8b1f60..84a306e 100644
--- a/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Aquality.Appium.Mobile.csproj
+++ b/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Aquality.Appium.Mobile.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ net48;net6.0
false
true
@@ -14,7 +14,7 @@
git
appium mobile ios android automation
LICENSE
- Copyright 2023 Aquality Automation
+ Copyright 2024 Aquality Automation
true
@@ -49,8 +49,8 @@
-
-
+
+
diff --git a/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Aquality.Appium.Mobile.xml b/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Aquality.Appium.Mobile.xml
index b60933c..428c5b0 100644
--- a/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Aquality.Appium.Mobile.xml
+++ b/Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Aquality.Appium.Mobile.xml
@@ -114,6 +114,13 @@
Closes application and disposes if it not null.
+
+
+ Terminate the particular application if it is running.
+
+ the bundle identifier (or app id) of the app to be terminated.
+ true if the app was running before and has been successfully stopped.
+
Provides current AppiumDriver service instance (would be null if driver is not local).
diff --git a/Aquality.Appium.Mobile/tests/Aquality.Appium.Mobile.Tests/Aquality.Appium.Mobile.Tests.csproj b/Aquality.Appium.Mobile/tests/Aquality.Appium.Mobile.Tests/Aquality.Appium.Mobile.Tests.csproj
index 1d987c9..5fe643e 100644
--- a/Aquality.Appium.Mobile/tests/Aquality.Appium.Mobile.Tests/Aquality.Appium.Mobile.Tests.csproj
+++ b/Aquality.Appium.Mobile/tests/Aquality.Appium.Mobile.Tests/Aquality.Appium.Mobile.Tests.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
true
false
@@ -13,7 +13,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/LICENSE b/LICENSE
index a6ceff9..ecef83a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -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.
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 403947e..0d8afd8 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -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'
@@ -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'
@@ -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'