当前位置: 首页>>代码示例>>C#>>正文


C# AndroidApp.WaitForElement方法代码示例

本文整理汇总了C#中AndroidApp.WaitForElement方法的典型用法代码示例。如果您正苦于以下问题:C# AndroidApp.WaitForElement方法的具体用法?C# AndroidApp.WaitForElement怎么用?C# AndroidApp.WaitForElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AndroidApp的用法示例。


在下文中一共展示了AndroidApp.WaitForElement方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: SalesHomePage

        public SalesHomePage(AndroidApp app)
            : base(app, "WEEKLY AVERAGE")
        {
            FirstLead = x => x.Marked("50% - Value Proposition");
            ListView = x => x.Id("content");
            AddLeadButton = x => x.Class("FormsImageView");
            LeadCell = x => x.Class("ViewCellRenderer_ViewCellContainer");
            ChartIdentifier = x => x.Id("stripLinesLayout");
            //Verifying page has loaded
            app.WaitForElement(LeadCell);
            app.WaitForElement(ChartIdentifier);

            app.WaitForNoElement(SalesDataLoading, timeout: TimeSpan.FromSeconds(20));
            app.WaitForNoElement(LeadsLoading, timeout: TimeSpan.FromSeconds(20));
        }
开发者ID:xamarin-automation-service,项目名称:UITest-Training-Assignment,代码行数:15,代码来源:SalesHomePage.cs

示例3: CustomerSalesPage

        public CustomerSalesPage(AndroidApp app)
            : base(app)
        {
            app.WaitForElement("WEEKLY AVERAGE", timeout: TimeSpan.FromMinutes(2));

            app.Screenshot("On " + this.GetType().Name);
        }
开发者ID:xamarin-automation-service,项目名称:UITest-Training-Assignment,代码行数:7,代码来源:CustomerSalesPage.cs

示例4: BasePage

        protected BasePage(AndroidApp app, Func<AppQuery, AppQuery> androidTrait)
            : this(app)
        {
            Assert.DoesNotThrow(() => app.WaitForElement(androidTrait), "Unable to verify on page: " + this.GetType().Name);

            app.Screenshot("On " + this.GetType().Name);
        }
开发者ID:xamarin-automation-service,项目名称:UITest-Training-Assignment,代码行数:7,代码来源:BasePage.cs

示例5: 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

示例6: 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

示例7: TutorialPagePage

 public TutorialPagePage(AndroidApp app)
     : base(app)
 {
     app.WaitForElement(dismissPage);
 }
开发者ID:Merovingien13,项目名称:XamarinSample,代码行数:5,代码来源:TutorialPagePage.cs

示例8: StartPage

 public StartPage(AndroidApp app)
     : base(app)
 {
     app.Tap(GetServices); //Only for emulator
     app.WaitForElement(JoinButton);
 }
开发者ID:Merovingien13,项目名称:XamarinSample,代码行数:6,代码来源:StartPage.cs

示例9: HomePatientPage

 public HomePatientPage(AndroidApp app)
     : base(app)
 {
     app.WaitForElement(skipPage);
 }
开发者ID:Merovingien13,项目名称:XamarinSample,代码行数:5,代码来源:HomePatientPage.cs

示例10: PinCodePage

 public PinCodePage(AndroidApp app)
     : base(app)
 {
     app.WaitForElement(skipPage);
 }
开发者ID:Merovingien13,项目名称:XamarinSample,代码行数:5,代码来源:PinCodePage.cs

示例11: SignInPage

 public SignInPage(AndroidApp app)
     : base(app)
 {
     app.WaitForElement(InputLogin);
 }
开发者ID:Merovingien13,项目名称:XamarinSample,代码行数:5,代码来源:SignInPage.cs


注:本文中的AndroidApp.WaitForElement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。