{"id":21644443,"url":"https://github.com/samsung/tizen.appium","last_synced_at":"2025-04-11T18:22:16.570Z","repository":{"id":38010694,"uuid":"143107801","full_name":"Samsung/Tizen.Appium","owner":"Samsung","description":"Tizen.Appium is a service library that supports running Appium for Tizen applications.","archived":false,"fork":false,"pushed_at":"2023-04-07T10:04:08.000Z","size":10002,"stargazers_count":14,"open_issues_count":7,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-11T18:22:09.252Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Samsung.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}},"created_at":"2018-08-01T05:26:06.000Z","updated_at":"2025-03-04T13:28:16.000Z","dependencies_parsed_at":"2024-06-21T14:22:48.528Z","dependency_job_id":"c8803b33-bb06-4535-b9f6-b358efb8f71b","html_url":"https://github.com/Samsung/Tizen.Appium","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2FTizen.Appium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2FTizen.Appium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2FTizen.Appium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2FTizen.Appium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samsung","download_url":"https://codeload.github.com/Samsung/Tizen.Appium/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248456386,"owners_count":21106607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-25T05:40:16.530Z","updated_at":"2025-04-11T18:22:16.544Z","avatar_url":"https://github.com/Samsung.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tizen.Appium [![NuGet](https://img.shields.io/nuget/v/Tizen.Appium.svg?style=flat-square\u0026label=Tizen.Appium)](https://www.nuget.org/packages/Tizen.Appium/) [![NuGet](https://img.shields.io/nuget/v/Tizen.Appium.Forms.svg?style=flat-square\u0026label=Tizen.Appium.Forms)](https://www.nuget.org/packages/Tizen.Appium.Forms/)\r\n`Tizen.Appium` is a service library that supports running Appium for Tizen .NET applications. It can simulate user interactions on Tizen .NET applications (`ElmSharp`,`NUI`) and also cross platform `Xamarin.Forms` application. As its name implies, it works based on the [Appium](http://appium.io/) that is an open source test automation framework.\r\n\r\n## Getting Started with Tizen.Appium\r\n\r\n`Tizen.Appium` allows developers to write automated UI tests for Tizen .NET. \r\n\r\n### Prepare Your Test Environment\r\nThis [link](https://github.com/Samsung/Tizen.Appium/wiki/How-to-use-appium) show how to setup the Appium.\r\n\r\n### Adding Tizen.Appium support to Tizen .NET apps\r\nTo automated your Tizen .NET applications, add `Tizen.Appium` as a pacakage referernce to your application project.\r\n```xml\r\n\u003cPackageReference Include=\"Tizen.Appium\" Version=\"1.0.0-preview2\" /\u003e\r\n```\r\n\r\n\u003e ElmSharp and NUI applications require a [Tizen.NET package](https://tizen.myget.org/feed/dotnet/package/nuget/Tizen.NET) version 6.0 or higher.\r\n\r\n\u003e Xamarin.Forms application requires a [Tizen.NET 4.0.0](https://www.nuget.org/packages/Tizen.NET/4.0.0).\r\n\r\n### Initializing the Tizen.Appium\r\n\r\nAdd the following code to initialize `Tizen.Appium`. \r\n\r\n#### ElmSharp Application\r\n```cs\r\nusing Tizen.Appium;\r\n\r\nclass App : CoreUIApplication\r\n{\r\n    protected override void OnCreate()\r\n    {\r\n        base.OnCreate();\r\n#if UITEST\r\n        TizenAppium.StartService(AppType.ElmSharp);\r\n#endif\r\n        //...\r\n     }\r\n     //...\r\n}\r\n```\r\n\r\n#### NUI Application\r\n```cs\r\nusing Tizen.Appium;\r\n\r\nclass Program : NUIApplication\r\n{\r\n    protected override void OnCreate()\r\n    {\r\n        base.OnCreate();\r\n#if UITEST\r\n        TizenAppium.StartService(AppType.NUI);\r\n#endif\r\n        //...\r\n    }\r\n    //...\r\n}\r\n```\r\n\r\n#### Xamarin.Forms Application\r\n\r\n```cs\r\nusing Tizen.Appium;\r\n\r\nclass Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication\r\n{\r\n    protected override void OnCreate()\r\n    {\r\n        base.OnCreate();\r\n#if UITEST\r\n        TizenAppium.StartService();\r\n#endif\r\n        LoadApplication(new App());\r\n        //...\r\n    }\r\n    //...\r\n}\r\n```\r\n\r\n### Set AutomationId in Test Application\r\n\r\n`Tizen.Appium` automates the user interface by activating controls on the screen and performing input. To do this, you should assign a  unique identifier to each controls.\r\n\u003e Note that an exception will be thrown if an attempt is made to set the `AutomationId` property more than once.\r\n\r\n#### ElmSharp Application\r\nIn ElmSharp, the recommended way to set this identifier is by using `AutomationId` property as shown below.\r\n\r\n```cs\r\nvar button = new Button(window)\r\n{\r\n    Text = \"button\",\r\n    AutomationId = \"button\"\r\n};\r\n```\r\n\r\n#### NUI Application\r\nThe true is same on NUI application. \r\n\r\n```cs\r\nPushButton button = new PushButton\r\n{\r\n    LabelText = \"Button\",\r\n    AutomationId = \"button\"\r\n}\r\n```\r\n\r\n#### Xamarin.Forms Application\r\nThe true is same on Xamarin.Forms application. \r\n\r\n```cs\r\nButton button = new Button\r\n{\r\n    Text = \"Button\",\r\n    AutomationId = \"button\"\r\n}\r\n```\r\n\r\n### Writing Your Test Script\r\nVisual Studio has a template to help add a Tizen .NET UI Test projenct to an existing your application solution:\r\n\u003e Upcoming [Visual Studio Tools for Tizen](https://marketplace.visualstudio.com/items?itemName=tizen.VisualStudioToolsforTizen) will support this template. Until then, you can manually create and use the UI test project.\r\n\r\n1. Right click on the solution, and select File \u003e New Project\r\n\r\n2. From the Tizen Templates, select the UI Test App template\r\n\r\n#### How to manually create a UI Test project\r\n\r\n1. Create a test project in Visual Studio\u003cbr\u003e\r\n   Select Visual C# -\u003e Test -\u003e Nunit Test Project\r\n   \u003e If you know use to other test project, you can use it.\r\n   \r\n   ![image](https://user-images.githubusercontent.com/16184582/54807302-2cc43a00-4cc0-11e9-82fc-ebdbdff3d7ae.png)\r\n\r\n2. Add `Appium.WebDriver` as a package reference to your project (*.csporj)\r\n\u003eTizen driver is supported from `Appium.WebDriver 4.0.0.2-beta`. Therefore, we recommend that you use the version or later.\r\n\u003cimg src=\"https://github.com/Samsung/Tizen.Appium/wiki/images/appium_webdriver_nuget.png\"\u003e\r\n\r\n3. Add the following code to initialize the `TizenDriver` and set the `AppiumOptions`\r\n```cs\r\npublic class UITest\r\n{\r\n    TizenDriver\u003cTizenElement\u003e _driver;\r\n\r\n    [SetUp]\r\n    public void Setup()\r\n    {\r\n        AppiumOptions appiumOptions = new AppiumOptions();\r\n\r\n        appiumOptions.AddAdditionalCapability(\"platformName\", \"Tizen\");\r\n        appiumOptions.AddAdditionalCapability(\"deviceName\", \"emulator-26101\");\r\n\r\n        //Xamarin.Forms\r\n        appiumOptions.AddAdditionalCapability(\"appPackage\", \"org.tizen.example.FormsApp.Tizen.Mobile\");\r\n\r\n        //ElmSharp\r\n        //appiumOptions.AddAdditionalCapability(\"appPackage\", \"org.tizen.example.ElmSharpApp\");\r\n\r\n        //NUI\r\n        //appiumOptions.AddAdditionalCapability(\"appPackage\", \"org.tizen.example.NUIApp\");\r\n\r\n        _driver = new TizenDriver\u003cTizenElement\u003e(new Uri(\"http://127.0.0.1:4723/wd/hub\"), appiumOptions);\r\n    }\r\n\r\n    [Test]\r\n    public void Test1()\r\n    {\r\n        _driver.FindElementByAccessibilityId(\"Button\").Click();\r\n    }\r\n}\r\n```\r\n\u003e Write scripts with reference to [Supported Commands](https://github.com/Samsung/Tizen.Appium/wiki/Supported-Commands)\r\n\r\nMake sure you set the appium server ip(ex:127.0.0.1:4723) and port number. You should set same server port number. (appium default port number is '4723')\r\n\u003e If you want to find a device name, use 'sdb devices' command. You can find device list and the name.\r\n\r\n4. Install Nunit3 Test Adapter\u003cbr\u003e\r\n   Go to Tools -\u003e Extesion and Updates -\u003e Select Online -\u003e Search 'Nunit 3 Test Adapter'\r\n   ![image](https://user-images.githubusercontent.com/16184582/54807753-94c75000-4cc1-11e9-9f3d-20f6f41b3d73.png)\r\n   \r\n5. Open Test Explorer\u003cbr\u003e\r\n   Go to Test -\u003e Windows -\u003e Test Explorer\u003cbr\u003e\r\n   ![image](https://user-images.githubusercontent.com/16184582/54807946-1fa84a80-4cc2-11e9-8fd8-1352f8018c96.png)\r\n\r\n### Running UI Automation Test\r\n\r\nRight-click on your test, and select ‘Run Test’.\u003cbr\u003e\r\n![image](https://user-images.githubusercontent.com/16184582/54808076-6c8c2100-4cc2-11e9-983d-eccc517c748c.png)\r\n\r\nIf the test is successful.\u003cbr\u003e\r\n![image](https://user-images.githubusercontent.com/16184582/54808182-ca206d80-4cc2-11e9-8f37-117a867a8646.png)\r\n\r\nIf the test is fails, you can determine the cause.\u003cbr\u003e\r\n![image](https://user-images.githubusercontent.com/16184582/54808277-1bc8f800-4cc3-11e9-957e-54f1d00bf4bd.png)\r\n\r\n### Current Support\r\n#### Wearable\r\n - 4.0 or later version of `Wearable devices` and `Emulator`.\r\n#### Mobile\r\n - 4.0 or later version of `Emulator`.\r\n#### TV\r\n - Not Supported due to security policy at the moment.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsung%2Ftizen.appium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamsung%2Ftizen.appium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsung%2Ftizen.appium/lists"}