public void RunUnitTests()
        {
            //app.Repl();
            var appName = GetAppName();

            Console.WriteLine(appName);

            app.Tap(c => c.Id("RunTestsButton"));

            app.WaitFor(() => app.Query(a => a.Id("ResultsResult")).Single().Text != string.Empty);

            var resultLabel = app.Query(a => a.Id("ResultsResult")).Single();

            Console.WriteLine(resultLabel.Text);

            Console.WriteLine(string.Empty);

            Console.WriteLine("Test Results:");

            app.Tap(c => c.Id("TestSuiteListView"));

            app.WaitFor(() => app.Query(a => a.Id("ResultsId")).Count() >= 1 && !app.Query(a => a.Id("ResultsId")).Any(b => b.Text.Contains("appName")));

            Assert.AreEqual("Passed", resultLabel.Text);
        }
Exemple #2
0
 public void App_Login_login()
 {
     app.EnterText("et_login", "Altamir");
     app.EnterText("et_pass", "12345");
     app.DismissKeyboard();
     app.Tap("bt_logar");
     app.WaitFor(() =>
                 app.Query(e => e.Id("tx_result"))
                 .First().Enabled, "Wait for page",
                 TimeSpan.FromSeconds(20));
 }
Exemple #3
0
        public void WeatherApp_TestSearchCapability_ShouldDisplayCorrectLocation()
        {
            // Tap on the Zip Code input
            app.WaitForElement(c => c.Css("#zip-code-input"));

            app.Screenshot("Entering the Zip Code");
            app.Tap(c => c.Css("#zip-code-input"));

            // Enter the Zip Code
            app.EnterText("90210");

            // Perform the Search
            app.Screenshot("Performing the Search");
            app.Tap(c => c.Css("#get-weather-btn"));

            // Wait for the title to appear
            app.WaitFor(() => app.Query(c => c.Css("#title")).First().TextContent == "Beverly Hills");

            // Check the correct postcode appears
            app.Screenshot("Viewing the Search Results");
        }