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 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); }
public static API_IE_ExecutionGUI homepage(this API_IE_CxWebClient cxWeb) { return cxWeb.open(""); }
public static bool loggedIn(this API_IE_CxWebClient cxClient) { return(ie.hasLink("Logout")); // better detection modes will be needed }
public static API_IE_CxWebClient login(this API_IE_CxWebClient cxClient, Credential credential) { return(cxClient.login(credential.UserName, credential.Password)); }