Exemple #1
0
    public void BasicFahrenheitSetup()
    {
        // Let something load before proceeding
        app.WaitForElement(x => x.Marked("JunctionTemperatureLabel"));
        app.Screenshot("Initial launch");

        app.SetSliderValue(x => x.Class("FormsSeekBar").Index(0), 250);
        app.SetSliderValue(x => x.Class("FormsSeekBar").Index(1), 208);
        app.ScrollDown();               // Might be necessary on small screens
        app.SetSliderValue(x => x.Class("FormsSeekBar").Index(2), 50);
        app.Screenshot("Sliders set for 5V from 12V at 0.5A");

        app.ScrollUp();
        app.SetOrientationLandscape();
        app.Screenshot("Setup in landscape");

        app.SetOrientationPortrait();
        app.Tap(x => x.Marked("OK"));
        app.Screenshot("Opened settings");

        app.Tap(x => x.Text("Fahrenheit (°F)"));
        app.Screenshot("Tapped on view with class: FormsTextView");

        app.SwipeRightToLeft();
        app.Screenshot("Swiped left");

        app.WaitForElement(x => x.Marked("JunctionTemperatureLabel"));
        var temperatureF = app.Query(x => x.Marked("JunctionTemperatureLabel"));

        Assert.IsTrue(temperatureF[0].Text.Equals("JUNCTION TEMP: 222.1 ˚F"));
    }
Exemple #2
0
        public void NewTest()
        {
            app.Tap(x => x.Text("09:00 bis 17.00 Uhr"));
            app.Screenshot("Tapped on view with class: FormsTextView");
            app.Tap(x => x.Class("SwitchCompat"));
            app.Screenshot("Tapped on view with class: SwitchCompat");
            app.SetSliderValue(x => x.Class("FormsSeekBar"), 1000);
            app.Tap(x => x.Class("ImageButton"));
            app.Screenshot("Tapped on view with class: ImageButton");
            app.Tap(x => x.Text("Sprecher"));
            app.Screenshot("Tapped on view with class: AppCompatTextView");
            app.Tap(x => x.Text("Dominick Baier"));
            app.Screenshot("Tapped on view with class: FormsTextView");
            app.Tap(x => x.Class("ImageButton"));
            app.Screenshot("Tapped on view with class: ImageButton");
            app.Tap(x => x.Text("Favoriten"));
            app.Screenshot("Tapped on view with class: AppCompatTextView");
            app.Tap(x => x.Class("AppCompatImageView").Index(3));
            app.Screenshot("Tapped on view with class: AppCompatImageView");
            app.Tap(x => x.Class("EntryEditText"));
            app.Screenshot("Tapped on view with class: EntryEditText");
            app.EnterText(x => x.Class("EntryEditText"), "*****@*****.**");

            app.Tap(x => x.Class("FormsImageView").Index(5));
            app.Screenshot("Tapped on view with class: FormsImageView");
            app.Tap(x => x.Text("Senden"));
            app.Screenshot("Tapped on view with class: AppCompatButton");
            app.Tap(x => x.Id("button2"));
            app.Screenshot("Tapped on view with class: AppCompatButton");
        }