summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core.iOS.UITests/Remotes/RemoteFactory.cs
blob: ec9757ef825abd4990cdd91adabeae73d45f4bc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;

using Xamarin.UITest;
using Xamarin.UITest.Queries;

namespace Xamarin.Forms.Core.UITests
{

// Potential cleanup of Raw Queries
//		public void MyTest(IApp app)
//		{
//			var viewName = "myView";
//
//			app.Query (x => x.Marked (viewName + " View").Parent ().Index (0).Sibling ().Index (1).Child (0).Child (0));
//
//			app.Query (x => x.Marked (viewName + " View").Parent (0).Sibling (1).Child (0).Child (0));
//
//			app.Query (x => x.LayeredHiddenButton ("mine").LayeredHiddenButton ("yours"));
//
//			app.Query (x => x.LayeredHiddenButton (viewName).Parentx(4));
//
//			app.ForAndroid (x => {
//				x.Back();
//			});
//		}


// Potential cleanup of Raw Queries
// make public or reflection will not pick up in REPL
//	internal static class Exts
//	{
//		public static void ForAndroid(this IApp app, Action<AndroidApp> action)
//		{
//			if (app is AndroidApp)
//			{
//				action (app as AndroidApp);
//			}
//		}
//
//		public static AppQuery LayeredHiddenButton(this AppQuery query, string viewName)
//		{
//			if(query.QueryPlatform == QueryPlatform.Android)
//			{
//				return query.Marked (viewName + " Android View").Parent (0).Sibling (1).Child (0).Child (0);
//
//			}
//			return query.Marked (viewName + " iOS View").Parent (0).Sibling (1).Child (0).Child (0);
//		}
//		 
//		public static AppQuery Parentx(this AppQuery query, int index)
//		{
//			return query.Parent ().Index (index);
//		}
//	}

}