Here are the examples of the csharp api class Xamarin.UITest.Queries.AppQuery.Class(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
53 Examples
0
1. Example
Project: sensus
Source File: AndroidTests.cs
Source File: AndroidTests.cs
protected override Func<AppQuery, AppQuery> GetStatusLinesQuery() { return c => c.Class("TextCellRenderer_TextCellView").Class("TextView"); }
0
2. Example
Project: sensus
Source File: iOSTests.cs
Source File: iOSTests.cs
protected override Func<AppQuery, AppQuery> GetStatusLinesQuery() { return c => c.Class("UITableViewLabel"); }
0
3. Example
Project: Xamarin-Sidebar
Source File: Tests.cs
Source File: Tests.cs
AppQuery IntroTitle(AppQuery app) { return app.Class("UILabel").Marked("Sidebar Navigation"); }
0
4. Example
Project: Xamarin-Sidebar
Source File: Tests.cs
Source File: Tests.cs
AppQuery ContentTitle(AppQuery app) { return app.Class("UILabel").Marked("Content"); }
0
5. Example
Project: app-evolve
Source File: SessionsDetailsPage.cs
Source File: SessionsDetailsPage.cs
public Query StarNumber(int number) { int newnumber = OniOS ? (number - 1) * 2 : number * 2; return x => x.Class(StarImage).Index(newnumber); }
0
6. Example
Project: Xamarin.Forms.Plugins
Source File: IAppExtensions.cs
Source File: IAppExtensions.cs
public static AppResult[] FindAllImages(this IApp app) { return app.DeviceType() == UiTests.DeviceType.Android ? app.Query (c => c.Class ("ImageView")) : app.Query (c => c.Class ("UiImage")); }
0
7. Example
Project: GithubXamarin
Source File: Tests.cs
Source File: Tests.cs
[Test] public void CardViewExists () { app.Screenshot ("Launch"); app.WaitForElement (q => q.Class ("CardView")); }
0
8. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
[Test] public void CardViewExists () { app.Screenshot ("Launch"); app.WaitForElement (q => q.Class ("CardView")); }
0
9. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
[Test] public void AppLaunches () { app.Screenshot ("Launch"); app.WaitForElement (q => q.Class ("PercentFrameLayout")); }
0
10. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
[Test] public void AppLaunches () { app.Screenshot ("Launch"); app.WaitForElement (q => q.Class ("PercentFrameLayout")); }
0
11. Example
Project: xamarinu-connect2016
Source File: AndroidTaskSystem.cs
Source File: AndroidTaskSystem.cs
public ITaskSystem SetName (string name) { app.EnterText (c => c.Class("EditText").Index(0), name); return this; }
0
12. Example
Project: xamarinu-connect2016
Source File: AndroidTaskSystem.cs
Source File: AndroidTaskSystem.cs
public ITaskSystem SetNotes (string notes) { app.EnterText (c => c.Class("EditText").Index(1), notes); return this; }
0
13. Example
Project: xamarinu-connect2016
Source File: IOSTaskSystem.cs
Source File: IOSTaskSystem.cs
public ITaskSystem SetName (string name) { app.EnterText (c => c.Class ("UITextField").Index (0), name); return this; }
0
14. Example
Project: xamarinu-connect2016
Source File: IOSTaskSystem.cs
Source File: IOSTaskSystem.cs
public ITaskSystem SetNotes (string notes) { app.EnterText (c => c.Class ("UITextField").Index (1), notes); return this; }
0
15. Example
Project: gMusic
Source File: PlayMusicTest.cs
Source File: PlayMusicTest.cs
public static void PlaySong(IApp app) { MenuTests.GotoSongs (app); app.Tap(x => x.Class("MusicPlayer_Cells_MediaItemCellView").Index(2)); //app.Screenshot ("Playback started"); // WaitForPlaybackPercent (app, 10); // app.Screenshot ("Played Half song"); }
0
16. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void DefaultOverlay_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Id ("buttonScanDefaultView")); app.WaitForElement (q => q.Class ("ZXingSurfaceView")); app.WaitForElement (q => q.Class ("ZxingOverlayView")); app.TakeScreenshot ("View Default Scanner"); }
0
17. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void ContinuousScanning_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Id ("buttonScanContinuous")); app.WaitForElement (q => q.Class ("ZXingSurfaceView")); app.WaitForElement (q => q.Class ("ZxingOverlayView")); app.TakeScreenshot ("View Continuous Scanner"); }
0
18. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void FragmentScanner_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Id ("buttonFragment")); app.WaitForElement (q => q.Class ("ZXingSurfaceView")); app.WaitForElement (q => q.Class ("ZxingOverlayView")); app.TakeScreenshot ("View Fragment Scanner"); }
0
19. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void BarcodeGenerator_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Id ("buttonGenerate")); app.WaitForElement (q => q.Class ("ImageView").Id ("imageBarcode")); app.TakeScreenshot ("View Barcode Generator"); }
0
20. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void DefaultOverlay_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Marked ("Scan with Default View")); app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingScannerView")); app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingDefaultOverlayView")); app.TakeScreenshot ("View Default Overlay"); }
0
21. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void ContinuousScanning_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Marked ("Scan Continuously")); app.WaitForElement (q => q.Class ("ZXing_Mobile_AVCaptureScannerView")); app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingDefaultOverlayView")); app.TakeScreenshot ("View Continuous Scanner"); }
0
22. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void AVCaptureEngine_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Marked ("Scan with AVCapture Engine")); app.WaitForElement (q => q.Class ("ZXing_Mobile_AVCaptureScannerView")); app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingDefaultOverlayView")); app.TakeScreenshot ("View AVCaptureEngine Scanner"); }
0
23. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void BarcodeGenerator_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Marked ("Generate Barcode")); app.WaitForElement (q => q.Class ("UIImageView")); app.TakeScreenshot ("View Barcode"); }
0
24. Example
Project: MyDriving
Source File: BasePage.cs
Source File: BasePage.cs
void InitializeCommonQueries() { if (OnAndroid) { _hamburger = x => x.Marked("Navigate up"); _tab = name => x => x.Id("design_menu_item_text").Text(name); } if (OniOS) { _tab = name => x => x.Class("UITabBarButtonLabel").Text(name); } }
0
25. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
public void RecyclerView () { app.Screenshot ("Launch"); app.WaitForElement (q => q.Class ("RecyclerView")); app.WaitForElement (q => q.Text ("Canada")); app.Screenshot ("RecylerView"); }
0
26. Example
Project: app-evolve
Source File: BasePage.cs
Source File: BasePage.cs
void InitializeCommonQueries() { if (OnAndroid) { Hamburger = x => x.Class("ImageButton").Marked("OK"); Tab = name => x => x.Id("design_menu_item_text").Text(name); } if (OniOS) { Tab = name => x => x.Class("UITabBarButtonLabel").Text(name); } }
0
27. Example
Project: GithubXamarin
Source File: Tests.cs
Source File: Tests.cs
[Test] public void ClickingHamburgerShouldRevealDrawer () { app.Screenshot ("Launch"); app.Tap(t => t.Class("ImageButton")); app.WaitForElement(t => t.Text("Discussion")); app.Screenshot ("Tap Hamburger"); }
0
28. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void CustomOverlay_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Id ("buttonScanCustomView")); app.WaitForElement (q => q.Class ("ZXingSurfaceView")); app.WaitForElement (q => q.Text ("Place a barcode in the camera viewfinder to scan it. Barcode will scan Automatically.")); app.TakeScreenshot ("View Custom Overlay Scanner"); }
0
29. Example
Project: ZXing.Net.Mobile
Source File: InitializationTests.cs
Source File: InitializationTests.cs
[Test] public void CustomOverlay_Initializes () { app.TakeScreenshot ("App Launches"); app.Tap (q => q.Marked ("Scan with Custom View")); app.WaitForElement (q => q.Class ("ZXing_Mobile_ZXingScannerView")); app.WaitForElement (q => q.Text ("Torch")); app.TakeScreenshot ("View Custom Overlay Scanner"); }
0
30. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
[Test] public void SimpleForm () { app.Screenshot ("Launch"); app.Tap (q => q.Text ("1. Simple Form")); app.Screenshot ("Tap 1. Simple Form"); app.WaitForElement (q => q.Class ("GridLayout")); app.Screenshot ("Simple Form"); }
0
31. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
[Test] public void FormXml () { app.Screenshot ("Launch"); app.Tap (q => q.Text ("2. Form (XML)")); app.Screenshot ("Tap 2. Form (XML)"); app.WaitForElement (q => q.Class ("GridLayout")); app.Screenshot ("Form Xml"); }
0
32. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
[Test] public void FormCSharp () { app.Screenshot ("Launch"); app.Tap (q => q.Text ("3. Form (C#)")); app.Screenshot ("Tap 3. Form (C#)"); app.WaitForElement (q => q.Class ("GridLayout")); app.Screenshot ("Form C#"); }
0
33. Example
Project: eShopOnAzure
Source File: Tests.cs
Source File: Tests.cs
[Test] public void LoginTest() { app.Tap(x => x.Text("[ LOGIN ]")); app.Tap(x => x.Class("WebView").Css("INPUT#Email")); app.EnterText(x => x.Class("WebView").Css("INPUT#Email"), "[email protected]"); app.Tap(x => x.Class("WebView").Css("INPUT#Password")); app.EnterText(x => x.Class("WebView").Css("INPUT#Password"), "eshopContainers.123"); app.Tap(x => x.Class("WebView").Css("BUTTON.btn.btn-default.btn-brand.btn-brand-big")); app.Screenshot("eShopOnContainers Login process"); }
0
34. Example
Project: eShopOnContainers
Source File: Tests.cs
Source File: Tests.cs
[Test] public void LoginTest() { app.Tap(x => x.Text("[ LOGIN ]")); app.Tap(x => x.Class("WebView").Css("INPUT#Email")); app.EnterText(x => x.Class("WebView").Css("INPUT#Email"), "[email protected]"); app.Tap(x => x.Class("WebView").Css("INPUT#Password")); app.EnterText(x => x.Class("WebView").Css("INPUT#Password"), "eshopContainers.123"); app.Tap(x => x.Class("WebView").Css("BUTTON.btn.btn-default.btn-brand.btn-brand-big")); app.Screenshot("eShopOnContainers Login process"); }
0
35. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
[Test] public void ActionBarMechanics () { app.Screenshot ("Launch"); app.Tap(q => q.Text("Action Bar Mechanics")); app.WaitForElement (q => q.Class ("Toolbar")); app.Screenshot ("Action Bar Mechanics"); // Tap the action bar button app.Tap (q => q.Class ("ActionMenuItemView")); // Wait for toast to show app.WaitForElement (q => q.Id ("message")); app.Screenshot ("Toast"); // Tap the overflow menu app.Tap(q => q.Class("OverflowMenuButton")); app.WaitForElement (q => q.Text ("Normal item")); app.Screenshot ("Menu Item"); app.Tap (q => q.Text ("Normal item")); // Wait for toast to show app.WaitForElement (q => q.Id ("message")); }
0
36. Example
Project: Beer-Drinkin
Source File: WelcomeTests.cs
Source File: WelcomeTests.cs
[Test] public void CanSignIn() { app.WaitForElement(x => x.Text("Connect with Facebook")); app.Screenshot("Then I see the Facebook auth button"); app.Tap(x => x.Text("Connect with Facebook")); app.Screenshot("Then I tap 'Connect with Facebook' button"); app.WaitForElement(x => x.Class("UIWebView")); app.Tap(x => x.Class("UIWebView").Css("INPUT._56bg._4u9z._5ruq")); app.Screenshot("Tapped on username"); app.Tap(x => x.Class("UIWebView").Css("INPUT._56bg._4u9z._5ruq")); app.Screenshot("Tapped on view with class: UIWebView"); app.EnterText(x => x.Class("UIWebView").Css("INPUT._56bg._4u9z._5ruq"), "[email protected]"); app.EnterText(x => x.Class("UIWebView").Css("INPUT#u_0_2"), "ilovebeer"); app.Tap(x => x.Class("UIWebView").Css("BUTTON#u_0_6")); app.WaitForElement(x => x.Text("Picture Search")); app.Screenshot("Finished Signing In"); }
0
37. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
[Test] public void ActionBarTabs () { app.Screenshot ("Launch"); app.Tap(q => q.Text("Action Bar Tabs")); app.WaitForElement (q => q.Class ("Toolbar")); app.Screenshot ("Action Bar Tabs"); // Turn tabs on app.Tap (q => q.Id ("btn_toggle_tabs")); // Add Tabs app.Tap (q => q.Id ("btn_add_tab")); app.WaitForElement (q => q.Text ("Tab 0")); app.Screenshot ("Add Tab 0"); app.Tap (q => q.Id ("btn_add_tab")); app.WaitForElement (q => q.Text ("Tab 1")); app.Screenshot ("Add Tab 1"); app.Tap (q => q.Id ("btn_remove_tab")); app.WaitForNoElement (q => q.Text ("Tab 1")); app.Screenshot ("Remove Tab 1"); app.Tap (q => q.Id ("btn_remove_all_tabs")); app.WaitForNoElement (q => q.Text ("Tab 0")); app.Screenshot ("Remove All Tabs"); }
0
38. Example
Project: app-customers
Source File: AndroidTests.cs
Source File: AndroidTests.cs
[TestCase("message")] [TestCase("phone")] [TestCase("email")] [TestCase("directions")] public void VerifyExternalLink (string link) { Dictionary<string, int> LinkIndexes = new Dictionary<string, int>(); LinkIndexes.Add("message", 2); LinkIndexes.Add("phone", 3); LinkIndexes.Add("email", 4); LinkIndexes.Add("directions", 1); app.Tap(x => x.Marked("Bell, Floyd")); app.Screenshot("Selected contact with name: 'Bell, Floyd'"); app.Tap(x => x.Class("FormsImageView").Index(LinkIndexes[link])); System.Threading.Thread.Sleep(5000); app.Screenshot(String.Format("Verify {0} opened", link)); }
0
39. Example
Project: RockMvvmForms
Source File: Tests.cs
Source File: Tests.cs
[Test] public void PorlaTarde () { app.Tap(x => x.Marked("A-Bomb (HAS)")); app.Screenshot("Tapped on view UILabel with Text: 'A-Bomb (HAS)'"); app.Tap(x => x.Text("Marvel Rocks")); app.Screenshot("Tapped on view UILabel with Text: 'Marvel Rocks'"); app.Tap(x => x.Class("UISearchBarTextField")); app.Screenshot("Tapped on view UISearchBarTextField"); app.EnterText(x => x.Class("UISearchBarTextField"), "Thor"); app.Screenshot("Entered 'Thor' into view UISearchBarTextField"); app.PressEnter (); app.Tap(x => x.Class("Xamarin_Forms_Platform_iOS_LabelRenderer")); app.Screenshot("Tapped on view Xamarin_Forms_Platform_iOS_LabelRenderer"); app.Tap(x => x.Text("Marvel Rocks")); app.Screenshot("Tapped on view UILabel with Text: 'Marvel Rocks'"); Assert.IsTrue (true); }
0
40. Example
Project: RockMvvmForms
Source File: Tests.cs
Source File: Tests.cs
[Test] public void TestRock () { app.Tap(x => x.Class("Xamarin_Forms_Platform_iOS_LabelRenderer").Index(1)); app.Screenshot("Tapped on view Xamarin_Forms_Platform_iOS_LabelRenderer"); app.Tap(x => x.Text("Marvel Rocks")); app.Screenshot("Tapped on view UILabel with Text: 'Marvel Rocks'"); app.Tap(x => x.Class("UISearchBarTextField")); app.Screenshot("Tapped on view UISearchBarTextField"); app.EnterText(x => x.Class("UISearchBarTextField"), "Thor"); app.PressEnter (); app.Screenshot("Entered 'Thor' into view UISearchBarTextField"); app.Tap(x => x.Class("Xamarin_Forms_Platform_iOS_LabelRenderer")); app.Screenshot("Tapped on view Xamarin_Forms_Platform_iOS_LabelRenderer"); app.Tap(x => x.Text("Marvel Rocks")); app.Screenshot("Tapped on view UILabel with Text: 'Marvel Rocks'"); Assert.IsTrue (true); }
0
41. Example
Project: MyDriving
Source File: BasePage.cs
Source File: BasePage.cs
public void NavigateTo(string tabName) { if (OnAndroid) { if (App.Query(_hamburger).Any()) App.Tap(_hamburger); App.Screenshot("Navigation Menu Open"); int count = 0; while (!App.Query(tabName).Any() && count < 3) { App.ScrollDown(x => x.Class("NavigationMenuView")); count++; } } App.Tap(_tab(tabName)); }
0
42. Example
Project: app-customers
Source File: AndroidTests.cs
Source File: AndroidTests.cs
[Test] public void EditCustomerInList () { app.Tap(x => x.Marked("Cardell, Jesus")); app.Screenshot("Selected contact with name: 'Cardell, Jesus'"); app.Tap(x => x.Marked("Edit")); app.Screenshot("Tapped on 'Edit' button"); app.Tap(x => x.Marked("First").Sibling()); app.ClearText(x => x.Marked("First").Sibling()); app.EnterText("New Name"); app.Screenshot("Entered 'New Name' into First Name Field"); app.Tap(x => x.Marked("Last").Sibling()); app.ClearText(x => x.Marked("Last").Sibling()); app.EnterText("In List"); app.Screenshot("Entered 'In List' into Last Name Field"); app.Tap(x => x.Class("ActionMenuItemView")); app.Screenshot("Saved contact"); app.Tap(x => x.Class("android.widget.ImageButton")); app.Screenshot("Tapped on 'back' button"); app.ScrollDownTo(x => x.Marked("In List, New Name")); app.Screenshot("Verified edited name appears in list"); }
0
43. Example
Project: app-evolve
Source File: BasePage.cs
Source File: BasePage.cs
public void NavigateTo(string tabName) { if (OnAndroid) { if (app.Query(Hamburger).Any()) app.Tap(Hamburger); app.Screenshot("Navigation Menu Open"); int count = 0; while (!app.Query(tabName).Any() && count < 3) { app.ScrollDown(x => x.Class("NavigationMenuView")); count++; } } app.Tap(Tab(tabName)); }
0
44. Example
Project: RockMvvmForms
Source File: Tests.cs
Source File: Tests.cs
[Test] public void NewTest () { app.Tap(x => x.Marked("A-Bomb (HAS)")); app.Screenshot("Tapped on view UILabel with Text: 'A-Bomb (HAS)'"); app.Tap(x => x.Text("Marvel Rocks")); app.Screenshot("Tapped on view UILabel with Text: 'Marvel Rocks'"); app.Tap(x => x.Class("UISearchBarTextField")); app.Screenshot("Tapped on view UISearchBarTextField"); app.EnterText(x => x.Class("UISearchBarTextField"), "Thor"); app.Screenshot("Entered 'Thor' into view UISearchBarTextField"); app.PressEnter (); app.Tap(x => x.Class("Xamarin_Forms_Platform_iOS_Platform_DefaultRenderer").Index(1)); app.Screenshot("Tapped on view Xamarin_Forms_Platform_iOS_Platform_DefaultRenderer"); app.Tap(x => x.Text("Marvel Rocks")); app.Screenshot("Tapped on view UILabel with Text: 'Marvel Rocks'"); Assert.IsTrue (true); }
0
45. Example
Project: app-customers
Source File: AndroidTests.cs
Source File: AndroidTests.cs
[Test] public void EditCustomer () { app.Tap(x => x.Marked("Armstead, Evan")); app.Screenshot("Selected contact with name: 'Armstead, Evan'"); app.Tap(x => x.Marked("Edit")); app.Screenshot("Tapped on 'edit' button"); app.Tap(x => x.Marked("First").Sibling()); app.ClearText(x => x.Marked("First").Sibling()); app.EnterText("Edited"); app.Screenshot("Entered 'Edited' into First Name Field"); app.Tap(x => x.Marked("Last").Sibling()); app.ClearText(x => x.Marked("Last").Sibling()); app.EnterText("Name"); app.Screenshot("Entered 'Name' into Last Name Field"); app.Tap(x => x.Class("ActionMenuItemView")); app.Screenshot("Saved contact"); app.WaitForElement(x => x.Text("Edited Name")); app.Screenshot("Verified contacts name changed to: 'Edited Name'"); }
0
46. Example
Project: RockMvvmForms
Source File: Tests.cs
Source File: Tests.cs
[Test] public void DotNetMalagaTest () { app.ScrollDownTo("Agent Brand"); app.Screenshot("Scrolled to Agent Brand"); app.Tap(x => x.Marked("Agent Brand")); app.Screenshot("Tapped on view UILabel with Text: 'Agent Brand'"); app.Tap(x => x.Text("Marvel Rocks")); app.Screenshot("Tapped on view UILabel with Text: 'Marvel Rocks'"); app.Tap(x => x.Class("UISearchBarTextField")); app.Screenshot("Tapped on view UISearchBarTextField"); app.EnterText(x => x.Class("UISearchBarTextField"), "Thor"); app.Screenshot("Entered 'Thor' into view UISearchBarTextField"); app.PressEnter (); app.Tap(x => x.Class("Xamarin_Forms_Platform_iOS_Platform_DefaultRenderer").Index(22)); app.Screenshot("Tapped on view Xamarin_Forms_Platform_iOS_Platform_DefaultRenderer"); app.Tap(x => x.Text("Marvel Rocks")); app.Screenshot("Tapped on view UILabel with Text: 'Marvel Rocks'"); Assert.IsTrue (true); }
0
47. Example
Project: AndroidSupportComponents
Source File: Tests.cs
Source File: Tests.cs
[Test] public void Video () { app.Screenshot ("Launch"); app.Tap (q => q.Text ("Dark Theme")); app.Screenshot ("Dark Theme"); app.Tap (q => q.Text ("Cats with hats")); app.Screenshot ("Cats with hats"); if (app.Query (q => q.Class ("MediaRouteButton")).Any ()) { app.WaitForElement (q => q.Class ("MediaRouteButton")); app.Tap (q => q.Class ("MediaRouteButton")); app.WaitForElement (q => q.Id ("media_route_list")); app.Screenshot ("Connect to device"); app.Back (); app.WaitForNoElement (q => q.Id ("media_route_list")); } }
0
48. Example
Project: app-customers
Source File: AndroidTests.cs
Source File: AndroidTests.cs
[Test] public void AddNewCustomer () { app.Tap(x => x.Class("Floating/n ..... /n //View Source file for more details /n }
0
49. Example
Project: sensus
Source File: Tests.cs
Source File: Tests.cs
[Test] public void TestApp() { // run tests and wait for results _app.Tap(c => c.Text("Run Tests")); _app.WaitForElement(c => c.Text("Overall result:"), timeout: TimeSpan.FromSeconds(90)); // get and parse label content List<AppResult> labels = _app.Query(q => q.Class(_labelClass)).ToList(); string overallResult = labels[labels.FindIndex(label => label.Text.Trim() == "Overall result:") + 1].Text; int testsRun = int.Parse(labels[labels.FindIndex(label => label.Text.Trim() == "Tests run:") + 1].Text); int testsPassed = int.Parse(labels[labels.FindIndex(label => label.Text.Trim() == "Passed:") + 1].Text); // check results if (overallResult != "Passed" || testsPassed != testsRun) { _app.Tap(c => c.Text("Failed Results")); _app.Screenshot("Failures"); throw new Exception($"{testsPassed} of {testsRun} passed."); } }
0
50. Example
Project: app-customers
Source File: AndroidTests.cs
Source File: AndroidTests.cs
[Test] public void UpdateCustomerAddress () { app.Tap(x => x.Marked("/n ..... /n //View Source file for more details /n }