Xamarin.UITests Helpers for the Uno Platforms for iOS and Android
Перейти к файлу
Jérôme Laban 45d6be253c Add project files. 2019-02-05 15:49:53 -05:00
build Add project files. 2019-02-05 15:49:53 -05:00
src Add project files. 2019-02-05 15:49:53 -05:00
.gitattributes Add .gitignore and .gitattributes. 2019-02-05 13:58:39 -05:00
.gitignore Add .gitignore and .gitattributes. 2019-02-05 13:58:39 -05:00
.vsts-ci.yml Add project files. 2019-02-05 15:49:53 -05:00
License.md Add project files. 2019-02-05 15:49:53 -05:00
Readme.md Add project files. 2019-02-05 15:49:53 -05:00
gitversion.yml Add project files. 2019-02-05 15:49:53 -05:00

Readme.md

Uno.UITests.Helpers

A set of Xamarin.UITest helpers for the UI Testsing of Uno Platform applications for iOS and Android.

WebAssembly testing is currently not supported.

Usage

[Test]
public void When_SmokeTest()
{
	var mainButton = _app.Find("mainButton");

	var position = mainButton.FirstResult().Rect;
	_app.TapCoordinates(position.X + 5, position.Y + 5);

	var mainButtonResults = _app.Find("mainButtonResults");

	_app.WaitForDependencyPropertyValue(mainButtonResults, "Text", "Pressed 1");
}

See this UI Tests sample for more details.

For Android and iOS, the x:Name marked controls in the XAML are automatically mapped to contentDescription when <IsUiAutomationMappingEnabled>true</IsUiAutomationMappingEnabled> is set in both iOS and Android projects.