public static API_TeamMentor_IE __manageUsers(this API_TeamMentor_IE teamMentor)
        {
            teamMentor.open("Aspx_Pages/ManageUsers.aspx");
            var ie = teamMentor.ie;

            return(teamMentor);
        }
 public static API_TeamMentor_IE loginAs_3_types_of_users(this API_TeamMentor_IE teamMentor)
 {
     teamMentor.loginAs_A();
     teamMentor.loginAs_Editor();
     teamMentor.loginAs_Admin();
     return(teamMentor);
 }
        public static API_TeamMentor_IE __createNewUser(this API_TeamMentor_IE teamMentor)
        {
            teamMentor.open("/");
            var ie = teamMentor.ie;

            teamMentor.logout();
            teamMentor.open("/Aspx_Pages/CreateEdit.aspx");

            string username = 6.randomLetters();
            string password = 6.randomLetters();;
            //string passwordHash = "3";
            string repeatPassword = password;
            string companyBox     = "aaaaa";
            string emailBox       = "{0}@{0}.com".format(username);

            string titleBox  = "bbbbb";
            string firstName = "cccc";
            string lastName  = "dddd";
            string notesBox  = "eeee";


            ie.field("ctl00_ContentPlaceHolder1_UsernameBox", username);
            ie.field("ctl00_ContentPlaceHolder1_PasswordBox", password);
            //ie.field("ctl00_ContentPlaceHolder1_PasswordHash",passwordHash);
            ie.field("ctl00_ContentPlaceHolder1_RepeatPasswordBox", repeatPassword);

            ie.field("ctl00_ContentPlaceHolder1_CompanyBox", companyBox);
            ie.field("ctl00_ContentPlaceHolder1_EmailBox", emailBox);
            ie.field("ctl00_ContentPlaceHolder1_FNameBox", firstName);
            ie.field("ctl00_ContentPlaceHolder1_LNameBox", lastName);
            ie.field("ctl00_ContentPlaceHolder1_NotesBox", notesBox);
            ie.field("ctl00_ContentPlaceHolder1_TitleBox", titleBox);
            ie.button("Sign Up").click();
            return(teamMentor);
        }
        public static API_TeamMentor_IE __select_AuthenticationAndAuthorization(this API_TeamMentor_IE teamMentor)
        {
            teamMentor.open("/");
            var ie = teamMentor.ie;

            ie.link("OWASP Top 10 2010").click();
            ie.link("Fundamentals of Security").click();
            ie.link("Authentication and Authorization").click();
            return(teamMentor);
        }
        public static API_TeamMentor_IE login(this API_TeamMentor_IE teamMentor, string username, string password)
        {
            teamMentor.loginPage();
            var ie = teamMentor.ie;

            ie.waitForField("UsernameBox").value(username);
            ie.field("PasswordBox").value(password);
            ie.button("login").click();
            return(teamMentor);
        }
 public static API_TeamMentor_IE __delete2ndUser(this API_TeamMentor_IE teamMentor)
 {
     /*	var ie = teamMentor.IE;
      *      teamMentor.loginAs_Admin();
      *              teamMentor.manageUsers();
      *              ie.link("delete").click();
      *              ie.button("Delete User").click();
      */
     return(teamMentor);
 }
        public static API_TeamMentor_IE __open_GuidanceItem(this API_TeamMentor_IE teamMentor)
        {
            teamMentor.open("/");
            var ie = teamMentor.ie;

            ie.link("A01: Injection").click();
            while (ie.hasLink("AJAX Injection Attack").isFalse())
            {
                ie.sleep(500);
            }
            ;                                                                                   // replace this with an Ajax call detector
            ie.link("AJAX Injection Attack").click();
            return(teamMentor);
        }
 public static API_IE_ExecutionGUI homePage(this API_TeamMentor_IE teamMentor)
 {
     teamMentor.open("");
     teamMentor.ie.waitForJsVariable("TM.HomePageLoaded");
     return(teamMentor);
 }
 public static API_TeamMentor_IE open_ASync(this API_TeamMentor_IE teamMentor, string virtualPath)
 {
     teamMentor.ie.open_ASync(teamMentor.fullUri(virtualPath));
     return(teamMentor);
 }
 public static string fullUri(this API_TeamMentor_IE teamMentor, string virtualPath)
 {
     return(new Uri(teamMentor.TargetServer.uri(), virtualPath).str());
 }
 public static API_IE_ExecutionGUI controlPanel_StandAlone(this API_TeamMentor_IE teamMentor)
 {
     return(teamMentor.open("/Aspx_Pages/ControlPanel.aspx"));
 }
 public static API_TeamMentor_IE open_FireBugLite(this API_TeamMentor_IE teamMentor)
 {
     teamMentor.ie.invokeEval("loadAdminPage('/Javascript/Firebug/beta/Firebug.html');");
     return(teamMentor);
 }
 public static API_TeamMentor_IE loginAs_Admin(this API_TeamMentor_IE teamMentor)
 {
     return(teamMentor.login("admin", "!!tmbeta"));
 }
 public static API_TeamMentor_IE controlPanel_in_MainGui(this API_TeamMentor_IE teamMentor)
 {
     teamMentor.ie.invokeScript("controlPanel");
     return(teamMentor);
 }
 public static API_TeamMentor_IE loginPage(this API_TeamMentor_IE teamMentor)
 {
     teamMentor.ie.invokeScript("loadDialog", "/Html_Pages/Gui/Login.Html");
     return(teamMentor);
     //return teamMentor.open("/Aspx_Pages/LoginUser.aspx");
 }
 public static API_IE_ExecutionGUI __viewGuidance(this API_TeamMentor_IE teamMentor, string guid)
 {
     return(teamMentor.open("/Aspx_Pages/ViewGuidanceItem.aspx?ItemID={0}".format(guid)));
 }
 public static API_TeamMentor_IE library_Editor(this API_TeamMentor_IE teamMentor)
 {
     teamMentor.ie.waitForLink("Library Editor").click();
     return(teamMentor);
 }
 public static API_TeamMentor_IE loginAs_A(this API_TeamMentor_IE teamMentor)
 {
     return(teamMentor.login("a", "b"));
 }
 public static API_TeamMentor_IE loginAs_Editor(this API_TeamMentor_IE teamMentor)
 {
     return(teamMentor.login("editor", "b"));
 }
 public static API_IE_ExecutionGUI mainPage_Old(this API_TeamMentor_IE teamMentor)
 {
     return(teamMentor.open("/Aspx_Pages/TM_3_0.aspx"));
 }
 public static API_IE_ExecutionGUI mainPage_New(this API_TeamMentor_IE teamMentor)
 {
     return(teamMentor.open("/Aspx_Pages/TM_3_0_With_Panels.aspx"));
 }
 public static API_TeamMentor_IE js_homePage(this API_TeamMentor_IE teamMentor)
 {
     teamMentor.ie.invokeEval("homePage()");
     return(teamMentor);
 }
 public static API_TeamMentor_IE logout(this API_TeamMentor_IE teamMentor)
 {
     teamMentor.ie.link("Logout").click();
     return(teamMentor);
 }
 public static API_TeamMentor_IE __clear_Applied_Filters(this API_TeamMentor_IE teamMentor)
 {
     teamMentor.open("/");
     teamMentor.ie.eval("eraseCookie('Filter')");
     return(teamMentor);
 }