Exemple #1
0
        public static bool login(this API_JPetStore jPetStore, string username, string password)
        {
            jPetStore.open("/shop/signonForm.do");
            var ie = jPetStore.ie;

            ie.field("username").value(username);
            ie.field("password").value(password);
            jPetStore.ie.buttons()[1].click();
            return(ie.IE.Html.contains("Invalid username or password. Signon failed."));
        }
Exemple #2
0
        public static API_JPetStore createAccount(this API_JPetStore jPetStore, string username, string password,
                                                  string firstName, string lastName, string address1,
                                                  string phone, string city, string state, string zip,
                                                  string country, string email)
        {
            jPetStore.open("/shop/newAccount.do");
            var ie = jPetStore.ie;

            ie.field("account.username").value(username);
            ie.field("account.password").value(password);
            ie.field("repeatedPassword").value(password);
            ie.field("account.firstName").value(firstName);
            ie.field("account.lastName").value(lastName);
            ie.field("account.address1").value(address1);
            ie.field("account.phone").value(phone);
            ie.field("account.city").value(city);
            ie.field("account.state").value(state);
            ie.field("account.zip").value(zip);
            ie.field("account.country").value(country);
            ie.field("account.email").value(email);
            ie.button("Save Account Information").click();
            return(jPetStore);
        }
Exemple #3
0
 public static API_JPetStore logout(this API_JPetStore jPetStore)
 {
     jPetStore.open("/shop/signoff.do");
     return(jPetStore);
 }
Exemple #4
0
 public static API_JPetStore login_DefaultValues(this API_JPetStore jPetStore)
 {
     jPetStore.open("/shop/signonForm.do");
     jPetStore.ie.buttons()[1].click();
     return(jPetStore);
 }
Exemple #5
0
 public static API_JPetStore homePage(this API_JPetStore jPetStore)
 {
     jPetStore.open("");
     return(jPetStore);
 }