Exemple #1
0
        public void GettingStarted()
        {
            dynamic zombie = new ZombieDriver();

            zombie.visit("http://www.google.com");
            zombie.fill("q", "zombie.js");
            zombie.click("input[value=Search]");

            zombie.assert.text("title", "zombie.js - Google Search");
            zombie.assert.text("#f", "Zombie by assaf - JS.ORG");
        }
Exemple #2
0
        public void FormSubmission()
        {
            dynamic zombie = new ZombieDriver();
            zombie.waitDuration = "30s";

            zombie.visit("https://www.facebook.com");
            zombie.assert.text("title", "Facebook - Log In or Sign Up");

            zombie.fill("firstname", "Rick");
            zombie.fill("lastname", "Grimes");
            zombie.fill("input[type=password]", "SheriffR1ck");

            zombie.select("birthday_day", "14");
            zombie.select("birthday_month", "9");
            zombie.select("birthday_year", "1983");

            zombie.choose("Male");

            zombie.click("button[name=websubmit]");

            //  Validation error - Rick has no email address (due to the zombie apocolypse)
            zombie.assert.text("#reg_error_inner", "An error occurred. Please try again.");
        }
Exemple #3
0
        public void Navigation()
        {
            dynamic zombie = new ZombieDriver();

            zombie.visit("http://colinthegeek.com");
            zombie.assert.text("title", "Colin the Geek");

            // Page back to the earliest post
            while (zombie.query("a.older") != null)
            {
                zombie.click("a.older");
            }
            zombie.assert.text(".post:last-child h1", "Hello World");

            // Open the earliest post
            try { zombie.click(".post:last-child a"); }
            catch
            {
                // Disqus JavaScript intermittently throws errors :-(
            }

            zombie.assert.text("title", "Hello World · Colin the Geek");
            zombie.assert.url("http://colinthegeek.com/2015/01/31/hello-world/");
        }