{"id":37037802,"url":"https://github.com/aquality-automation/aquality-appium-mobile-dotnet","last_synced_at":"2026-01-14T04:30:02.704Z","repository":{"id":43398539,"uuid":"237432467","full_name":"aquality-automation/aquality-appium-mobile-dotnet","owner":"aquality-automation","description":"Aquality Mobile is a library built over Appium tool that allows to automate work with mobile applications (as web as native)","archived":false,"fork":false,"pushed_at":"2025-10-15T12:39:47.000Z","size":3611,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-20T08:39:18.084Z","etag":null,"topics":["appium","aquality-mobile","automation","mobile-automation","qa"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aquality-automation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-01-31T13:09:59.000Z","updated_at":"2025-10-15T11:50:07.000Z","dependencies_parsed_at":"2024-07-31T12:56:45.572Z","dependency_job_id":"c017d221-f4d9-49ad-95cf-94667a0a478e","html_url":"https://github.com/aquality-automation/aquality-appium-mobile-dotnet","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/aquality-automation/aquality-appium-mobile-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquality-automation%2Faquality-appium-mobile-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquality-automation%2Faquality-appium-mobile-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquality-automation%2Faquality-appium-mobile-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquality-automation%2Faquality-appium-mobile-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aquality-automation","download_url":"https://codeload.github.com/aquality-automation/aquality-appium-mobile-dotnet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aquality-automation%2Faquality-appium-mobile-dotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appium","aquality-mobile","automation","mobile-automation","qa"],"created_at":"2026-01-14T04:30:01.840Z","updated_at":"2026-01-14T04:30:02.692Z","avatar_url":"https://github.com/aquality-automation.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aquality Appium Mobile for .NET\n\n[![Build Status](https://dev.azure.com/aquality-automation/aquality-automation/_apis/build/status/aquality-automation.aquality-appium-mobile-dotnet?branchName=master)](https://dev.azure.com/aquality-automation/aquality-automation/_build/latest?definitionId=7\u0026branchName=master)\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=aquality-automation_aquality-appium-mobile-dotnet\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=aquality-automation_aquality-appium-mobile-dotnet)\n[![NuGet](https://img.shields.io/nuget/v/Aquality.Appium.Mobile)](https://www.nuget.org/packages/Aquality.Appium.Mobile)\n\n### Overview\n\nThis package is a library designed to simplify automation of Android and iOS mobile applications using Appium.\n\nYou've got to use this set of methods, related to most common actions performed with web elements.\n\nMost of performed methods are logged using NLog, so you can easily see a history of performed actions in your log.\n\nWe use interfaces where is possible, so you can implement your own version of target interface with no need to rewrite other classes. \n\n### Quick start\n\nTo start the project using Aquality.Appium.Mobile framework, you can [download our template BDD project by this link.](https://github.com/aquality-automation/aquality-appium-mobile-dotnet-template)\n\nAlternatively, you can follow the steps below:\n\n\n1. Add the nuget dependency Aquality.Appium.Mobile to your project.\n\n2. Configure path to your application at settings.json:\n - Create a `Resources` folder in your project and copy [settings.json](Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Resources/settings.json) into it. \n - Select `Copy to Output Directory`: `Copy always` option at settings.json file properties.\n - Open settings.json and find `applicationPath` option under the `driverSettings` section of desired platform. Replace the value with full or relative path to your app, e.g. `./Resources/Apps/ApiDemos-debug.apk`.\n\n3. Ensure that [Appium server](https://appium.io) is set up at your machine where the code would be executed, and the address/port match to set in your `settings.json` in `remoteConnectionUrl` parameter.\nIf the parameter `isRemote` in your settings.json is set to `false`, this means that AppiumDriverLocalService would be used to setup Appium server using Node.js. This option requires specific version of node.js to be preinstalled on your machine (Please read more [here](http://appium.io/docs/en/contributing-to-appium/appium-from-source/#nodejs) )\n\n\u003e Note:\nAfter migration to Appium v.5, we started using Appium server v.2 in our [azure-pipelines](azure-pipelines.yml). \n\u003e It has some breaking changes, described [here](https://appium.github.io/appium/docs/en/2.0/guides/migrating-1-to-2/).\n\u003e In particular:\n\u003e 1. Please install required driver manually:\n\u003e ```yaml\n\u003e npm install -g appium@next\n\u003e appium driver install uiautomator2\n\u003e 2. As soon as we continue to use \"remoteConnectionUrl\": \"http://127.0.0.1:4723/wd/hub\" in our [settings.json](Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Resources/settings.json), we need to specify the `--base-path` when starting Appium server:\n\u003e ```yaml\n\u003e appium --allow-insecure chromedriver_autodownload --base-path /wd/hub \u0026\n\u003e ```\n\u003e 3. We also recommend disabling element caching and w3c in chromeOptions when you run Android Chrome session. Take a look at example here: [settings.androidwebsession.json](Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Resources/settings.androidwebsession.json).\n\n4. (optional) Launch an application directly by calling `var application = AqualityServices.Application;`. \n\u003e Note: \nIf you don't start an Application directly, it would be started with the first call of any Aquality service or class requiring interacting with the Application.\n\n5. That's it! Now you are able work with Application via AqualityServices or via element services.\nPlease take a look at our example tests [here](Aquality.Appium.Mobile/tests/Aquality.Appium.Mobile.Tests/Samples/)\n\n6. To interact with Application's forms and elements, we recommend following the Page/Screen Objects pattern. This approach is fully integrated into our package.\nTo start with that, you will need to create a separate class for each window/form of your application, and inherit this class from the [Screen](Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Screens/Screen.cs). \n\n\u003e We recommend to use separate Screen class for each form of your application. You can take advantage of inheritance and composition pattern. We also suggest not to mix app different platforms in single class: take advantage of interfaces instead, adding the default implementation to them if is needed.\n\n7. From the Screen Object perspective, each Screen consists of elements on it (e.g. Buttons, TextBox, Labels and so on). \nTo interact with elements, on your form class create fields of type IButton, ITextBox, ILabel, and initialize them using the `AqualityServices.ElementFactory`. Created elements have a various methods to interact with them. We recommend combining actions into a business-level methods:\n\n```csharp\nusing Aquality.Appium.Mobile.Elements.Interfaces;\nusing Aquality.Appium.Mobile.Screens;\nusing OpenQA.Selenium;\n\nnamespace Aquality.Appium.Mobile.Tests.Samples.Android.ApiDemosScreens\n{\n    public class InvokeSearchScreen : AndroidScreen\n    {\n\n        private readonly ITextBox searchTextBox;\n        private readonly IButton startSearchButton;\n        private readonly ILabel searchResultLabel;\n\n        public InvokeSearchScreen() : base(By.XPath(\"//android.widget.TextView[@text='App/Search/Invoke Search']\"), \"Invoke Search\")\n        {\n            searchTextBox = ElementFactory.GetTextBox(By.Id(\"txt_query_prefill\"), \"Search\");\n            startSearchButton = ElementFactory.GetButton(By.Id(\"btn_start_search\"), \"Start search\");\n            searchResultLabel = ElementFactory.GetLabel(By.Id(\"android:id/search_src_text\"), \"Search results\");\n        }\n\n        public void SubmitSearch(string query)\n        {\n            searchTextBox.ClearAndType(query);\n            startSearchButton.Click();\n        }\n\n        public string SearchResult =\u003e searchResultLabel.Text;\n    }\n}\n```\n\n8. We use `Microsoft.Extensions.DependencyInjection` inside the `AqualityServices` to inject dependencies, so you can simply implement your MobileStartup extended from [MobileStartup](Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Applications/MobileStartup.cs) and inject it to `AqualityServices.SetStartup(yourStartup)`.\n\n### ScreenFactory\n\nWhen you automate tests for both iOS and Android platforms it is good to have only one set of tests and different implementations of screens. `ScreenFactory` allows to do this. You can define abstract classes for your screens and have different implementations for iOS and Android platforms. After that you can use `ScreenFactory` to resolve a necessary screen depending on the chosen platform.\n\n1. Set `screensLocation` property in `settings.json`. It is a name of Assembly where you define screens.\n\n2. Define abstract classes for the screens:\n\n```csharp\nusing Aquality.Appium.Mobile.Elements.Interfaces;\nusing Aquality.Appium.Mobile.Screens;\nusing OpenQA.Selenium;\n\nnamespace Aquality.Appium.Mobile.Template.Screens.Login\n{\n    public abstract class LoginScreen : Screen\n    {\n        private readonly ITextBox usernameTxb;\n        private readonly ITextBox passwordTxb;\n        private readonly IButton loginBtn;\n\n        protected LoginScreen(By locator) : base(locator, \"Login\")\n        {\n            usernameTxb = ElementFactory.GetTextBox(UsernameTxbLoc, \"Username\");\n            passwordTxb = ElementFactory.GetTextBox(PasswordTxbLoc, \"Password\");\n            loginBtn = ElementFactory.GetButton(LoginBtnLoc, \"Login\");\n        }\n\n        protected abstract By UsernameTxbLoc { get; }\n\n        protected abstract By PasswordTxbLoc { get; }\n\n        protected abstract By LoginBtnLoc { get; }\n\n        public LoginScreen SetUsername(string username)\n        {\n            usernameTxb.SendKeys(username);\n            return this;\n        }\n\n        public LoginScreen SetPassword(string password)\n        {\n            passwordTxb.TypeSecret(password);\n            return this;\n        }\n\n        public void TapLogin() =\u003e loginBtn.Click();\n    }\n}\n```\n\n3. Implement interface (Android example):\n\n```csharp\nusing Aquality.Appium.Mobile.Applications;\nusing Aquality.Appium.Mobile.Screens.ScreenFactory;\nusing OpenQA.Selenium;\nusing OpenQA.Selenium.Appium;\n\nnamespace Aquality.Appium.Mobile.Template.Screens.Login\n{\n    [ScreenType(PlatformName.Android)]\n    public sealed class AndroidLoginScreen : LoginScreen\n    {\n        public AndroidLoginScreen() : base(By.XPath(\"//android.widget.TextView[@text='Login']\"))\n        {\n        }\n\n        protected override By UsernameTxbLoc =\u003e MobileBy.AccessibilityId(\"username\");\n\n        protected override By PasswordTxbLoc =\u003e MobileBy.AccessibilityId(\"password\");\n\n        protected override By LoginBtnLoc =\u003e MobileBy.AccessibilityId(\"loginBtn\");\n    }\n}\n```\n\n4. Resolve screen in test:\n\n```csharp\nvar loginScreen = AqualityServices.ScreenFactory.GetScreen\u003cLoginScreen\u003e();\n```\n\n### Devices\n\nOur library allows you to run tests on different devices and store their settings (like udid, name, etc.) in JSON files.\n\nYou have to add [devices.json](Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Resources/devices.json) file to resources where you can define a set of devices which you use to run tests.\n\nIt is possible to set default device for each platform in [settings.json](Aquality.Appium.Mobile/src/Aquality.Appium.Mobile/Resources/settings.json) by defining `deviceKey` property which is a key of device settings from `devices.json` file.\n\nYou can also create several profiles with devices by adding files with suffixes `devices.\u003cdevicesProfile\u003e.json` (like `devices.set1.json`) and then specify profile using environment variable `devicesProfile: set1`.\n\n### License\nLibrary's source code is made available under the [Apache 2.0 license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquality-automation%2Faquality-appium-mobile-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faquality-automation%2Faquality-appium-mobile-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faquality-automation%2Faquality-appium-mobile-dotnet/lists"}