當前位置: 首頁>>代碼示例>>C#>>正文


C# AndroidApp.Tap方法代碼示例

本文整理匯總了C#中AndroidApp.Tap方法的典型用法代碼示例。如果您正苦於以下問題:C# AndroidApp.Tap方法的具體用法?C# AndroidApp.Tap怎麽用?C# AndroidApp.Tap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在AndroidApp的用法示例。


在下文中一共展示了AndroidApp.Tap方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: AfterEachTest

        public void AfterEachTest()
        {
            // Start the application
            app = ConfigureApp.Android.StartApp();

            // Delete recently created city if still existing
            // Depending on your test configuration and environment, ConfigureApp.Android.StartApp(); sometimes
            // deployes a complete new package of the app. In this case, no cleanup work is needed.
            app.WaitForElement(x => x.Id("textView1"));
            var city = app.Query(x => x.Text(testCityName)).FirstOrDefault();
            if (city != null)
            {
                // Delete the recently created city
                app.Tap(x => x.Text(testCityName));
                app.WaitForElement(x => x.Class("OverflowMenuButton"));
                app.Tap(x => x.Class("OverflowMenuButton"));
                app.Tap(x => x.Class("TextView").Index(0)); // Edit button

                app.WaitForElement(x => x.Id("action_delete_city"), "Delete city button never appeared...");
                app.Tap(x => x.Id("action_delete_city"));
                app.Tap(x => x.Id("button1"));

                // Check if city has been deleted successfully
                var results = app.Query(x => x.Text(testCityName));
                Assert.IsFalse(results.Any());
            }
        }
開發者ID:Thepagedot,項目名稱:Pollenalarm,代碼行數:27,代碼來源:Tests.cs

示例2: BeforeEachTest

 public void BeforeEachTest()
 {
     app = ConfigureApp.Android.StartApp ();
     Func<AppQuery, AppQuery> menu_button_query = e => e.Id("menu_button");
     app.Tap (menu_button_query);
     Func<AppQuery, AppQuery> search_button = e => e.Text ("Search");
     app.Tap (search_button);
 }
開發者ID:aliarobinson,項目名稱:SpeedyChef_375,代碼行數:8,代碼來源:SearchActivityTests.cs

示例3: BeforeEachTest

        public void BeforeEachTest()
        {
            // Start the application
            app = ConfigureApp.Android.StartApp();

            // Create a new city
            app.WaitForElement(x => x.Id("action_add_city"));
            app.Tap(x => x.Id("action_add_city"));
            app.EnterText(x => x.Id("addEditCityName"), testCityName);
            app.EnterText(x => x.Id("addEditCityZip"), testCityZip);
            app.Tap(x => x.Id("action_add_city_confirm"));

            // Check if city has been created successfully
            var results = app.Query(x => x.Text(testCityName));
            Assert.IsTrue(results.Any());
        }
開發者ID:Thepagedot,項目名稱:Pollenalarm,代碼行數:16,代碼來源:Tests.cs

示例4: BeforeEachTest

        public void BeforeEachTest()
        {
            app = ConfigureApp.Android.StartApp ();
            app.Screenshot ("Given the app is loaded");
            app.Tap (x => x.Button ("btn_play"));

            app.WaitForElement (x => x.Id ("tv_bingoItem"));

            var results = app.Query (x => x.Id ("tv_bingoItem"));
            Assert.AreEqual (25, results.Length);
            app.Screenshot ("25 items should be shown");
        }
開發者ID:pavlinap,項目名稱:BullshitBingo,代碼行數:12,代碼來源:TestWinningConditions.cs

示例5: StartPage

 public StartPage(AndroidApp app)
     : base(app)
 {
     app.Tap(GetServices); //Only for emulator
     app.WaitForElement(JoinButton);
 }
開發者ID:Merovingien13,項目名稱:XamarinSample,代碼行數:6,代碼來源:StartPage.cs


注:本文中的AndroidApp.Tap方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。