示例#1
0
        public API_EventBrite login(string username, string password)
        {
            if (username.valid().isFalse())
            {
                "[API EventBrite] invalid username provided, aborting login sequence".error();
            }
            else
            {
                logout();
                ie.open("http://www.eventbrite.com/login");
                if (ie.hasField("email") && ie.hasField("passwd"))
                {
                    ie.field("email", username);
                    ie.field("passwd", password);

                    ie.buttons()[0].click();
                    checkLogin();
                }
                else
                {
                    "[API EventBrite] in login page, could not find fields: email or passwd".error();
                }
            }
            return(this);
        }
    	public static API_IE_CxWebClient login(this API_IE_CxWebClient cxClient, string username, string password)
    	{    	
			cxClient.open("/CxWebClient/login.aspx");	     			
			ie.field("txtUserName").value(username);
			ie.field("txtPassword").value(password);
			ie.button("Login").click();
			return cxClient;
		}
 public static IE_TeamProfessor login(this IE_TeamProfessor ieTeamProfessor, string username, string password)
 {
     ieTeamProfessor.logoff();
     ie.field("User Name").flash().value(username);
     ie.field("Password").flash().value(password);
     ie.button("Enter").flash().click();
     return(ieTeamProfessor);
 }
示例#4
0
 public static API_IE_CxWebClient login(this API_IE_CxWebClient cxClient, string username, string password)
 {
     if (cxClient.loggedIn())
     {
         "[API_IE_CxWebClient][login] user already logged in, skipping login".info();
     }
     else
     {
         cxClient.open("/CxWebClient/login.aspx");
         ie.field("txtUserName").value(username);
         ie.field("txtPassword").value(password);
         ie.button("Login").click();
     }
     return(cxClient);
 }
示例#5
0
        public API_BTOpenZone login(string fileWithLoginDetails)
        {
            ie.open(defaultWebPage);
            if (ie.title("Google"))
            {
                "we are already conneted to the internet".info();
            }
            else if (ie.title("BT Openzone"))
            {
                "detected BT Openzone page".info();
                // get the login details
                ICredential credential = fileWithLoginDetails.credential("BtOpenZone");
                if (credential == null)
                {
                    credential = ie.askUserForUsernameAndPassword();
                }

                if (credential == null)
                {
                    "no file with credentials provided, or no credential of type BtOpenZone found".debug();
                    credential = ie.askUserForUsernameAndPassword();
                }
                var BTOpenZone_UserName = credential.username();
                var BTOpenZone_Password = credential.password();
                // populate	fields and submit form
                if (ie.hasField("username") && ie.hasField("password"))
                {
                    "detected BT Openzone login Form".info();

                    "submitting login details".debug();
                    ie.field("username").value(BTOpenZone_UserName);
                    ie.field("password").value(BTOpenZone_Password);
                    ie.buttons()[0].click();
                    if (ie.hasField("username"))
                    {
                        "Login failed, Aborting worklow".error();
                        return(this);
                    }
                    ie.open(defaultWebPage);
                    if (ie.title("Google").isFalse())
                    {
                        "Expected Google page did not load".error();
                    }
                }
            }
            return(this);
        }
示例#6
0
        public static API_WordPress_IE login(this API_WordPress_IE apiWordPressIE)
        {
            if (apiWordPressIE.UserDetails.isNull())
            {
                apiWordPressIE.UserDetails = ascx_AskUserForLoginDetails.ask();
            }
            var credential = apiWordPressIE.UserDetails;

            if (credential.notNull())
            {
                apiWordPressIE.loginPage();
                ie.field("log", credential.UserName);
                ie.field("pwd", credential.Password);
                ie.button("Log In").click();
            }
            else
            {
                "[API_WordPress_IE] [login] no credentials provided".error();
            }
            return(apiWordPressIE);
        }