A Xamarin Studio add-in to facilitate using the page object pattern with UITest
-
Open Xamarin Studio's add-in manager and locate the Gallery. Under "Repository" choose "Manage Repositories..." and then add a new one with the following url:
https://matissehack.github.io/page-object-xs-addin/release/
-
Close the repository manager and choose "UITest Page Object Add-In" under "IDE extensions."
-
Install and enjoy
If you don't want to add the add-in repository to Xamarin Studio you can also download the latest release and install that manually through the add-in manager.
The new template helps initialize test suites that use the page object pattern. The template can be found under Multiplatform > Other > Page Object UI Test App.
The new files can be found in new file wizard in the "Page Object" category. There are templates for:
- Test fixtures
- Page classes
The new code completion templates include:
test
:
[Test]
public void $name$()
{
$end$
}
xx
:
x => x
qry
:
readonly Query $name$;
fqry
:
readonly Func<$inputType$, Query> $name$;
uqry
:
using Query = System.Func<Xamarin.UITest.Queries.AppQuery, Xamarin.UITest.Queries.AppQuery>;