Installation Environment:
1. Install Visual Studio and tick the Xamarin. Plugin, or install the plugin under the Tools-nuget Package management tool:
pm> install-package xamarin.uitest-version 2.0.9
pm> install-package xamarin.testcloud.agent-version 0.20.6 # #ios
pm> Install-package nunittestadapter-version 2.1.1
2. Install Xamarin Test Recorder.
Using Xamarin: Reference: https://developer.xamarin.com/guides/testcloud/uitest/quickstarts/
Positioning elements:
1, using uiautomatorviewer positioning, many elements are not located. Because the page is H5, it is recommended to use Chrome browser.
2, using Chrome browser, install chrome on the phone, open, enter Baidu.
Open chrome on your computer, enter chrome://inspect/#devices, and the elements inside Chrome can be positioned. But the elements inside the APK still can't be located: Show the tab is inactive ... Later find the reason to update again.
3. Open vs Repl, enter the tree command to see the day file displayed on the first line of the command window. The log file has element positioning.
[Test]
This starts up a typically very useful C # REPL that can is used to identify the UI elements.
public void Firstunittest ()
{
App. Repl ();
}
4, using the Xamarin Test Recorder function,
Open the Xamarin Test Recorder, and on the left side of the test file is a small button like a funnel (the left point of the line number) to record. The action element. The recorded script is problematic, but the element can be positioned.
Gesture Action: https://developer.xamarin.com/guides/testcloud/uitest/working-with/gestures/
New project: Visual C #---Test-----UI test App (Xamarin.ui Test | Android
Use Xamarin C # for app Automation testing on VS