Пример #1
0
        public void AlertShowsUp()
        {
            //creating an anrray of menu items:
            string[] stringArray = new string[12];
            stringArray[0]  = "background location";
            stringArray[1]  = "contacts";
            stringArray[2]  = "calendar";
            stringArray[3]  = "reminders";
            stringArray[4]  = "microphone";
            stringArray[5]  = "motion";
            stringArray[6]  = "camera";
            stringArray[7]  = "twitter";
            stringArray[8]  = "apns";
            stringArray[9]  = "apple music";
            stringArray[10] = "speech recognition";
            stringArray[11] = "health kit";


            for (int i = 0; i < stringArray.Length; i++)
            {
                //tapping each menu item
                app.Tap(x => x.Marked(stringArray[i]));
                //taking the screenshot
                app.Screenshot("Show Alert for " + stringArray[i]);
                //There is generally no need to call DismissSpringboardAlerts()in user test code, I'm calling this method to play it safe
                app.DismissSpringboardAlerts();
                app.Screenshot("alert dismissed");
                //adding a sleep of 5 seconds before tapping the next menu item to give the UI time to be ready
                Thread.Sleep(5 * 1000);
                if (i >= 6)
                {
                    app.ScrollDown();
                }
            }
        }
Пример #2
0
 public void System_dialog_display()
 {
     Thread.Sleep(10 * 1000); // Wait for 10 Seconds, so by this time the location system dialog should pop-up
     app.DismissSpringboardAlerts();
     app.Screenshot("First screen.");
 }