Skip to content

Make Test Script

Kangho Hur edited this page Mar 22, 2019 · 6 revisions

The UI Automation test requires a test script.
The test scripts can be created using appium-dotnet-driver and Selenium.
Appium supports various client libraries. Currently, we are providing .NET clients.

Follow the steps below

  1. Create a test script Project(Appium).

  2. Install nuget Appium.Webdriver

Tizen driver is supported from Appium.WebDriver 4.0.0.2-beta. Therefore, we recommend that you use the version or later.

  1. Initialize TizenDriver and set AppiumOptions like below code.

        static void Main(string[] args)
        {
            AppiumOptions appiumOptions = new AppiumOptions();
            appiumOptions.AddAdditionalCapability("platformName", "Tizen");
            appiumOptions.AddAdditionalCapability("deviceName", "emulator-26101");
            appiumOptions.AddAdditionalCapability("appPackage", "org.tizen.example.NUIApp");
    
            var driver = new TizenDriver<TizenElement>(new Uri("http://127.0.0.1:4723/wd/hub"), appiumOptions);
            ExecuteTest(driver);
        }
    
        static void ExecuteTest(TizenDriver<TizenElement> driver)
        {
            driver.FindElementByAccessibilityId("Button").Click();
        }

In my case, I have used the Tizen emulator, so I set the emulator name.
Make sure you set the appium server ip(ex:127.0.0.1:4723). Check port number, you should set same server port number. (appium default port number is '4723')

If you want to find a device name, use 'sdb devices' command. You can find device list and the name.

Clone this wiki locally