コード例 #1
0
ファイル: Examples.cs プロジェクト: ColinOrr/zombie.net
        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");
        }
コード例 #2
0
ファイル: Examples.cs プロジェクト: ColinOrr/zombie.net
        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.");
        }