コード例 #1
0
 public void ChangePassword()
 {
     Selenium.Click("link=My Personal Info");
     Selenium.WaitForPageToLoad("7000");
     Selenium.Type("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_CurrentPassword", "lex");
     Selenium.Type("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_NewPassword", "lex1");
     Selenium.Type("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_ConfirmNewPassword", "lex1");
     Selenium.Click("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_ChangePasswordPushButton");
     Selenium.Click("ctl00_MainContent_ChangePassword_SuccessContainerID_ContinuePushButton");
     Selenium.Click("ctl00_hypLogout");
     Selenium.Click("ctl00_btnOK");
     Selenium.WaitForPageToLoad("7000");
     Selenium.Type("ctl00_MainContent_Login1_UserName", "lex");
     Selenium.Type("ctl00_MainContent_Login1_Password", "lex1");
     Selenium.Click("ctl00_MainContent_Login1_LoginButton");
     Selenium.WaitForPageToLoad("7000");
     Selenium.Click("link=My Personal Info");
     Selenium.WaitForPageToLoad("7000");
     Selenium.Type("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_CurrentPassword", "lex1");
     Selenium.Type("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_NewPassword", "lex");
     Selenium.Type("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_ConfirmNewPassword", "lex");
     Selenium.Click("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_ChangePasswordPushButton");
     Selenium.Click("ctl00_MainContent_ChangePassword_SuccessContainerID_ContinuePushButton");
     Selenium.Click("ctl00_hypLogout");
     Selenium.Click("ctl00_btnOK");
     Selenium.WaitForPageToLoad("7000");
     Selenium.Type("ctl00_MainContent_Login1_UserName", "lex");
     Selenium.Type("ctl00_MainContent_Login1_Password", "lex");
     Selenium.Click("ctl00_MainContent_Login1_LoginButton");
     Selenium.WaitForPageToLoad("7000");
     AssertIsOnPage("StudentPage.aspx", null);
 }
コード例 #2
0
        public void ChangeFirstName()
        {
            Selenium.Click("link=My Personal Info");
            Selenium.WaitForPageToLoad("3000");

            Selenium.Type("ctl00_MainContent_TextBox_FirstName", "NewFName");
            Selenium.Click("ctl00_MainContent_Button_Update");
            Selenium.Click("link=Home");
            Selenium.WaitForPageToLoad("3000");

            AssertIsOnPage("StudentPage.aspx", null);
            AssertLabelText("ctl00_MainContent__headerLabel", "Student Page For: NewFName Shtenovych");

            Selenium.Click("link=My Personal Info");
            Selenium.WaitForPageToLoad("3000");

            Selenium.Type("ctl00_MainContent_TextBox_FirstName", "Volodymyr");
            Selenium.Click("ctl00_MainContent_Button_Update");
            //Selenium.WaitForPageToLoad("3000");
            Selenium.Click("link=Home");
            Selenium.WaitForPageToLoad("3000");

            AssertIsOnPage("StudentPage.aspx", null);
            AssertLabelText("ctl00_MainContent__headerLabel", "Student Page For: Volodymyr Shtenovych");
        }
コード例 #3
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void EditNameGroup()
        {
            Selenium.Click("link=Create Group");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00_MainContent_tbGroupName", "123");
            Selenium.Click("ctl00_MainContent_btnCreate");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Click("//tr[@id='ctl00_MainMenun15']/td/table/tbody/tr/td/a");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Click("ctl00_MainContent_GroupList_gvGroups_ctl03_lnkGroupName");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Type("ctl00_MainContent_tbGroupName", "12");
            Selenium.Click("ctl00_MainContent_btnApply");
            Selenium.Click("//tr[@id='ctl00_MainMenun15']/td/table/tbody/tr/td/a");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Click("ctl00_MainContent_GroupList_gvGroups_ctl03_lnkGroupName");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00_MainContent_tbGroupName", "123");
            Selenium.Click("ctl00_MainContent_btnApply");

            AssertIsOnPage("EditGroup.aspx", null);
            AssertLabelText("ctl00_MainContent_lbTitle", "Edit group 123");

            Selenium.Click("//tr[@id='ctl00_MainMenun15']/td/table/tbody/tr/td/a");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Click("ctl00_MainContent_GroupList_gvGroups_ctl03_lnkAction");
            Selenium.Click("ctl00_MainContent_GroupList_gvGroups_ctl03_btnOK");
            //Selenium.WaitForPageToLoad("30000");
        }
コード例 #4
0
        public void ChangeInfoAll()
        {
            Selenium.Click("link=My Personal Info");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00_MainContent_TextBox_FirstName", "NewFName");
            Selenium.Type("ctl00_MainContent_TextBox_SecondName", "NewSName");
            Selenium.Type("ctl00_MainContent_TextBox_Email", "[email protected]");
            Selenium.Click("ctl00_MainContent_Button_Update");

            Selenium.Click("link=Home");
            Selenium.WaitForPageToLoad("7000");

            AssertLabelText("ctl00_MainContent__headerLabel", "Student Page For: NewFName NewSName");

            Selenium.Click("link=My Personal Info");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00_MainContent_TextBox_FirstName", "Volodymyr");
            Selenium.Type("ctl00_MainContent_TextBox_SecondName", "Shtenovych");
            Selenium.Type("ctl00_MainContent_TextBox_Email", "*****@*****.**");
            Selenium.Click("ctl00_MainContent_Button_Update");

            Selenium.Click("link=Home");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Click("link=My Personal Info");
            Selenium.WaitForPageToLoad("7000");

            AssertIsOnPage("MyInfo.aspx", null);
            AssertTextBoxValue("ctl00_MainContent_TextBox_FirstName", "Volodymyr");
            AssertTextBoxValue("ctl00_MainContent_TextBox_SecondName", "Shtenovych");
            AssertTextBoxValue("ctl00_MainContent_TextBox_Email", "*****@*****.**");

            Selenium.Click("ctl00_hypLogout");
            Selenium.Click("ctl00_btnOK");
        }
コード例 #5
0
        private void DoContactsFollow()
        {
            int todo = Rand.Next(Config.BotFollowTaskBatchMinLimit, Config.BotFollowTaskBatchMaxLimit);
            int c    = Data.ContactsToFollow.Count;

            while (Data.ContactsToFollow.TryDequeue(out string uri) && todo > 0)
            {
                if (!MoveTo(uri))
                {
                    Log.LogWarning("ACTION STOPED : INSTAGRAM RETURN ERROR ON ({0})", uri);
                    break;                     // no retry
                }
                MyContactsInTryout.Add(uri);
                if (Selenium.GetElements(Config.CssContactFollow).Any())                 // manage the already followed like this
                {
                    WaitBeforeFollowHumanizer();
                    Selenium.Click(Config.CssContactFollow);
                    Data.MyContacts.Add(uri);
                    WaitHumanizer();                    // the url relad may break a waiting ball

                    // issue detection : too many actions lately ? should stop for 24-48h...
                    Selenium.CrashIfPresent(Config.CssActionWarning, "This action was blocked. Please try again later");

                    todo--;
                }
                else
                {
                    Data.MyContactsBanned.Add(uri);                     // avoid going back each time to a "requested" account
                }
            }
            Log.LogDebug("$ContactsToFollow -{0}", c - Data.ContactsToFollow.Count);
        }
コード例 #6
0
        private void PostAuthInit()
        {
            // Ignore the message bar : To help personalize content, tailor and measure ads, and provide a safer experience, we use cookies. By clicking or navigating the site, you agree to allow our collection of information on and off Instagram through cookies.
            Selenium.ClickIfPresent(Config.CssCookiesWarning);

            if (!Data.MyContactsUpdate.HasValue ||
                DateTime.UtcNow > Data.MyContactsUpdate.Value.AddHours(Config.BotCacheTimeLimitHours))
            {
                MoveTo(Data.UserContactUrl);
                WaitHumanizer();

                Selenium.Click(Config.CssContactsFollowing);
                WaitHumanizer();

                // ScroolDown
                SchroolDownLoop(Config.CssContactsListScrollable);                   // TOFIX : will crash if no contact at all

                Data.MyContacts = Selenium.GetAttributes(Config.UrlContacts)
                                  .ToHashSet();

                Log.LogDebug("MyContacts ={0}", Data.MyContacts.Count);

                Data.MyContactsUpdate = DateTime.UtcNow;
            }

            AddForced("AddContactsToFollow", Config.AddContactsToFollow, Data.ContactsToFollow);
            AddForced("AddPhotosToLike", Config.AddPhotosToLike, Data.PhotosToLike);
        }
コード例 #7
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void UserAllRole()
        {
            Selenium.Click("link=Create User");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_UserName", "TestUser7");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_Password", "1111");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword", "1111");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_Email", "[email protected]");

            Selenium.Click("ctl00_MainContent_CreateUserWizard1___CustomNav0_StepNextButtonButton");
            Selenium.Click("ctl00_MainContent_CreateUserWizard1_CompleteStepContainer_ContinueButtonButton");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("link=TestUser7");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Check("ctl00_MainContent_cbStudentRole");
            Selenium.Check("ctl00_MainContent_cbTrainerRole");
            Selenium.Check("ctl00_MainContent_cbLectorRole");
            Selenium.Check("ctl00_MainContent_cbAdminRole");
            Selenium.Check("ctl00_MainContent_cbSuperAdminRole");
            Selenium.Click("ctl00_MainContent_btnApply");

            Selenium.Click("link=Home");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Click("ctl00_hypLogout");
            Selenium.Click("ctl00_btnOK");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Type("ctl00_MainContent_Login1_UserName", "TestUser7");
            Selenium.Type("ctl00_MainContent_Login1_Password", "1111");
            Selenium.Click("ctl00_MainContent_Login1_LoginButton");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Click("link=My Personal Info");

            AssertHasText("STUDENT, LECTOR, TRAINER, ADMIN, SUPER_ADMIN");
            AssertHtmlText("ctl00_MainContent_Label_Roles", "STUDENT, LECTOR, TRAINER, ADMIN, SUPER_ADMIN");

            Selenium.Click("ctl00_hypLogout");
            Selenium.Click("ctl00_btnOK");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Type("ctl00_MainContent_Login1_UserName", "lex");
            Selenium.Type("ctl00_MainContent_Login1_Password", "lex");
            Selenium.Click("ctl00_MainContent_Login1_LoginButton");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");

            ClickOnLastButtonRemove();
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_btnYes");
            Selenium.WaitForPageToLoad("7000");

            AssertIsOnPage("Users.aspx", null);
            Assert.IsFalse(Selenium.IsTextPresent("TestUser7"));
        }
コード例 #8
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void AddMultipleUsers1()
        {
            Selenium.Click("link=Create User");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_lbCreateMultiple");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00_MainContent_tbPrefix", "TestUsers000");
            Selenium.Type("ctl00_MainContent_tbCount", "2");
            Selenium.Type("ctl00_MainContent_tbPassword", "1111");
            Selenium.Click("ctl00_MainContent_btnCreate");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Click("ctl00_hypLogout");
            Selenium.Click("ctl00_btnOK");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Type("ctl00_MainContent_Login1_UserName", "TestUsers0000");
            Selenium.Type("ctl00_MainContent_Login1_Password", "1111");
            Selenium.Click("ctl00_MainContent_Login1_LoginButton");
            Selenium.WaitForPageToLoad("30000");

            AssertIsOnPage("MyInfo.aspx", null);

            Selenium.Click("ctl00_hypLogout");
            Selenium.Click("ctl00_btnOK");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Type("ctl00_MainContent_Login1_UserName", "TestUsers0001");
            Selenium.Type("ctl00_MainContent_Login1_Password", "1111");
            Selenium.Click("ctl00_MainContent_Login1_LoginButton");
            Selenium.WaitForPageToLoad("30000");

            AssertIsOnPage("MyInfo.aspx", null);

            Selenium.Click("ctl00_hypLogout");
            Selenium.Click("ctl00_btnOK");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Type("ctl00_MainContent_Login1_UserName", "lex");
            Selenium.Type("ctl00_MainContent_Login1_Password", "lex");
            Selenium.Click("ctl00_MainContent_Login1_LoginButton");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");
            ClickOnLastButtonRemove();
            //Selenium.Click("ctl00_MainContent_UserList_gvUsers_ctl05_btnAction");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_btnYes");

            Assert.IsTrue(Selenium.IsTextPresent("TestUsers0000"));

            ClickOnLastButtonRemove();
            //Selenium.Click("ctl00_MainContent_UserList_gvUsers_ctl05_btnAction");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_btnYes");

            Assert.IsTrue(Selenium.IsTextPresent("TestUsers0001"));
        }
コード例 #9
0
        /// <summary>
        /// Select the specified project.
        /// </summary>
        /// <param name="controlRef">The control ref.</param>
        /// <returns>
        /// The same <see cref="ProjectPortalTestRunner"/> object.
        /// </returns>
        public ProjectPortalTestRunner ProjectSelect(string controlRef)
        {
            string locator =
                String.Format(CultureInfo.InvariantCulture, "xpath=//a[@href='{0}']", controlRef);

            Selenium.Click(locator);
            //Selenium.WaitForPageToLoad("10000");
            return(this);
        }
コード例 #10
0
        /// <summary>
        /// Clicks on the specified button.
        /// </summary>
        /// <param name="controlName">The Name of the control which is contained in the input field.</param>
        /// <returns>
        /// The same <see cref="ProjectPortalTestRunner"/> object.
        /// </returns>
        public new ProjectPortalTestRunner ClickOnButton(string controlName)
        {
            string locator =
                String.Format(CultureInfo.InvariantCulture, "xpath=//input[contains(@name,'{0}')]", controlName);

            Selenium.Click(locator);
            //Selenium.WaitForPageToLoad("10000");
            return(this);
        }
コード例 #11
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void SetUp()
        {
            Selenium.Open("/Login.aspx");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Type("ctl00_MainContent_Login1_UserName", "lex");
            Selenium.Type("ctl00_MainContent_Login1_Password", "lex");
            Selenium.Click("ctl00_MainContent_Login1_LoginButton");
            Selenium.WaitForPageToLoad("7000");
        }
コード例 #12
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void SearchUsersWithSName()
        {
            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00_MainContent_tbSearchPattern", "Shtenovych");
            Selenium.Click("ctl00_MainContent_btnSearch");

            Assert.IsFalse(Selenium.IsElementPresent("ctl00_MainContent_UserList_gvUsers"));
            Assert.IsFalse(Selenium.IsElementPresent("lex"));
        }
コード例 #13
0
        public void ChangePasswordNewPasswordAndConfirmNotSet()
        {
            Selenium.Click("link=My Personal Info");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_CurrentPassword", "lex");
            Selenium.Click("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_ChangePasswordPushButton");

            AssertIsOnPage("MyInfo.aspx", null);
            AssertIsVisibleTeg("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_NewPasswordRequired");
            AssertIsVisibleTeg("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_ConfirmNewPasswordRequired");
        }
コード例 #14
0
        public void CorrectLogin()
        {
            Selenium.Open("/Login.aspx");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00$MainContent$Login1$UserName", "lex");
            Selenium.Type("ctl00$MainContent$Login1$Password", "lex");
            Selenium.Click("ctl00$MainContent$Login1$LoginButton");
            Selenium.WaitForPageToLoad("7000");

            AssertIsOnPage("StudentPage.aspx", null);
        }
コード例 #15
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void UserRoleTrainer()
        {
            Selenium.Click("link=Create User");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_UserName", "TestUser3");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_Password", "1111");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword", "1111");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_Email", "[email protected]");

            Selenium.Click("ctl00_MainContent_CreateUserWizard1___CustomNav0_StepNextButtonButton");
            Selenium.Click("ctl00_MainContent_CreateUserWizard1_CompleteStepContainer_ContinueButtonButton");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Click("link=TestUser3");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Check("ctl00_MainContent_cbTrainerRole");
            Selenium.Click("ctl00_MainContent_btnApply");

            Selenium.Click("link=Home");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Click("ctl00_hypLogout");
            Selenium.Click("ctl00_btnOK");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Type("ctl00_MainContent_Login1_UserName", "TestUser3");
            Selenium.Type("ctl00_MainContent_Login1_Password", "1111");
            Selenium.Click("ctl00_MainContent_Login1_LoginButton");
            Selenium.WaitForPageToLoad("30000");

            AssertHasText("TRAINER");
            AssertHtmlText("ctl00_MainContent_Label_Roles", "TRAINER");

            Selenium.Click("ctl00_hypLogout");
            Selenium.Click("ctl00_btnOK");
            Selenium.WaitForPageToLoad("30000");

            Selenium.Type("ctl00_MainContent_Login1_UserName", "lex");
            Selenium.Type("ctl00_MainContent_Login1_Password", "lex");
            Selenium.Click("ctl00_MainContent_Login1_LoginButton");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");

            ClickOnLastButtonRemove();
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_btnYes");
            Selenium.WaitForPageToLoad("7000");

            AssertIsOnPage("Users.aspx", null);
            Assert.IsFalse(Selenium.IsTextPresent("TestUser3"));
        }
コード例 #16
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void SearchUsersWithFName()
        {
            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00_MainContent_tbSearchPattern", "Volodymyr");
            Selenium.Click("ctl00_MainContent_btnSearch");

            Assert.IsTrue(Selenium.IsElementPresent("ctl00_MainContent_UserList_gvUsers"));
            AssertLabelText("ctl00_MainContent_UserList_gvUsers_ctl03_lbFirstName", "Volodymyr");
            Assert.IsTrue(Selenium.IsTextPresent("Shtenovych"));
        }
コード例 #17
0
        private string GetUserId(string userLogin, string adminLogin, string adminPassword)
        {
            Login(adminLogin, adminPassword);
            Selenium.Open("/User/Index");
            Selenium.WaitForPageToLoad(LoadTime);
            Selenium.Click("xpath=//table//tr[td//text()[contains(., '" + userLogin + "')]]/td[7]/a[3]");
            Selenium.WaitForPageToLoad(LoadTime);
            string userId = Selenium.GetLocation().Substring(Selenium.GetLocation().IndexOf("id=") + 3);

            Logout();
            return(userId);
        }
コード例 #18
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void AddMultipleUsersBad4()
        {
            Selenium.Click("link=Create User");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Click("ctl00_MainContent_lbCreateMultiple");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Type("ctl00_MainContent_tbCount", "2");
            Selenium.Type("ctl00_MainContent_tbPassword", "2");
            Selenium.Click("ctl00_MainContent_btnCreate");

            AssertLabelText("ctl00_MainContent_lbErrors", "Some of users like these already exist");
        }
コード例 #19
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void AddMultipleUsersBad3()
        {
            Selenium.Click("link=Create User");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Click("ctl00_MainContent_lbCreateMultiple");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Type("ctl00_MainContent_tbPrefix", "TestUser");
            Selenium.Type("ctl00_MainContent_tbCount", "2");
            Selenium.Click("ctl00_MainContent_btnCreate");

            AssertLabelText("ctl00_MainContent_lbErrors", "Password is not specified");
        }
コード例 #20
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void AddMultipleUsersBad1()
        {
            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Click("ctl00_MainContent_btnCreateUser");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Click("ctl00_MainContent_lbCreateMultiple");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Click("ctl00_MainContent_btnCreate");

            AssertLabelText("ctl00_MainContent_lbErrors", "is not a number");
        }
コード例 #21
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void AddUserBad4()
        {
            Selenium.Click("link=Create User");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_Password", "1111");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword", "1111");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_Email", "asdsad");
            Selenium.Click("ctl00_MainContent_CreateUserWizard1___CustomNav0_StepNextButtonButton");

            AssertHasText("User Name is required.");
            AssertIsOnPage("CreateUser.aspx", null);
        }
コード例 #22
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void AddUserBad1()
        {
            Selenium.Click("link=Create User");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_CreateUserWizard1___CustomNav0_StepNextButtonButton");

            AssertIsVisibleTeg("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_UserNameRequired");
            AssertIsVisibleTeg("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_PasswordRequired");
            AssertIsVisibleTeg("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_ConfirmPasswordRequired");
            AssertIsVisibleTeg("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_EmailRequired");
            AssertIsOnPage("CreateUser.aspx", null);
        }
コード例 #23
0
        private string GetCurriculumId(string curriculumName, string teacherLogin, string teacherPassword)
        {
            Login(teacherLogin, teacherPassword);
            Selenium.Open("/Curriculum");
            Selenium.WaitForPageToLoad(LoadTime);
            Selenium.Click("xpath=//table//tr[td//text()[contains(., '" + curriculumName + "')]]/td[5]/a[1]");
            Selenium.WaitForPageToLoad(LoadTime);
            string curriculumId = Selenium.GetLocation().Substring(Selenium.GetLocation().IndexOf("Curriculum/") + 11, Selenium.GetLocation().IndexOf("/Edit") - (Selenium.GetLocation().IndexOf("Curriculum/") + 11));

            Logout();
            return(curriculumId);
        }
コード例 #24
0
        public void ChangePasswordConfirmNotSet()
        {
            Selenium.Click("link=My Personal Info");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Type("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_CurrentPassword", "lex");
            Selenium.Type("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_ConfirmNewPassword", "11111");
            Selenium.Click("ctl00_MainContent_ChangePassword_ChangePasswordContainerID_ChangePasswordPushButton");

            AssertIsOnPage("MyInfo.aspx", null);
            AssertHasText("The Confirm New Password must match the New Password entry.");
        }
コード例 #25
0
        public void SQLinjectionLogin()
        {
            Selenium.Open("/Login.aspx");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00$MainContent$Login1$UserName", "' OR 1 #");
            Selenium.Type("ctl00$MainContent$Login1$Password", "");
            Selenium.Click("ctl00$MainContent$Login1$LoginButton");
            Selenium.WaitForPageToLoad("7000");

            AssertHasText("Your login attempt was not successful. Please try again.");
            AssertIsOnPage("Login.aspx", null);
        }
コード例 #26
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void AddMultipleUsers2()
        {
            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_btnCreateUser");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_lbCreateMultiple");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Type("ctl00_MainContent_tbPrefix", "TestUsers6");
            Selenium.Type("ctl00_MainContent_tbCount", "2");
            Selenium.Type("ctl00_MainContent_tbPassword", "1111");
            Selenium.Click("ctl00_MainContent_cbAddToGroup");
            Selenium.Check("ctl00_MainContent_cbMakeStudent");
            Selenium.Select("ctl00_MainContent_cbGroups", "label=123");

            selenium.Click("//option[@value='1']");

            Selenium.Click("ctl00_MainContent_btnCreate");

            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("link=TestUsers60");
            Selenium.WaitForPageToLoad("7000");

            AssertCheckBoxState(true, "ctl00_MainContent_cbStudentRole");
            AssertLabelText("ctl00_MainContent_GroupList_gvGroups_ctl02_Label1", "Group");
            Assert.IsTrue(Selenium.IsTextPresent("123"));

            //Selenium.WaitForPageToLoad("7000");
            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("link=TestUsers61");
            Selenium.WaitForPageToLoad("7000");

            AssertCheckBoxState(true, "ctl00_MainContent_cbStudentRole");
            AssertLabelText("ctl00_MainContent_GroupList_gvGroups_ctl02_Label1", "Group");
            Assert.IsTrue(Selenium.IsTextPresent("123"));

            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");
            ClickOnLastButtonRemove();
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_btnYes");

            Assert.IsTrue(Selenium.IsTextPresent("TestUsers60"));

            ClickOnLastButtonRemove();
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_btnYes");

            Assert.IsTrue(Selenium.IsTextPresent("TestUsers61"));
        }
コード例 #27
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void AddMultipleUsers3()
        {
            Selenium.Click("link=Create User");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_lbCreateMultiple");
            Selenium.WaitForPageToLoad("7000");
            Selenium.Type("ctl00_MainContent_tbPrefix", "TestUsers13");
            Selenium.Type("ctl00_MainContent_tbCount", "2");
            Selenium.Type("ctl00_MainContent_tbPassword", "1111");

            Selenium.Click("ctl00_MainContent_cbAddToGroup");
            Selenium.Type("ctl00_MainContent_tbNewGroup", "NewGroup");
            Selenium.Check("ctl00_MainContent_cbMakeStudent");
            Selenium.Click("ctl00_MainContent_btnCreate");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Click("link=TestUsers130");
            Selenium.WaitForPageToLoad("7000");

            AssertCheckBoxState(true, "ctl00_MainContent_cbStudentRole");
            AssertLabelText("ctl00_MainContent_GroupList_gvGroups_ctl02_Label1", "Group");
            Assert.IsTrue(Selenium.IsTextPresent("NewGroup"));

            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");

            Selenium.Click("link=TestUsers131");
            Selenium.WaitForPageToLoad("7000");

            AssertCheckBoxState(true, "ctl00_MainContent_cbStudentRole");
            AssertLabelText("ctl00_MainContent_GroupList_gvGroups_ctl02_Label1", "Group");
            Assert.IsTrue(Selenium.IsTextPresent("NewGroup"));

            Selenium.Click("ctl00_MainContent_GroupList_gvGroups_ctl03_lnkAction");
            //Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_GroupList_gvGroups_ctl03_btnOK");
            //Selenium.WaitForPageToLoad("7000");

            Selenium.Click("link=Users");
            Selenium.WaitForPageToLoad("7000");
            ClickOnLastButtonRemove();
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_btnYes");

            Assert.IsTrue(Selenium.IsTextPresent("TestUsers130"));

            ClickOnLastButtonRemove();
            Selenium.WaitForPageToLoad("7000");
            Selenium.Click("ctl00_MainContent_btnYes");

            Assert.IsTrue(Selenium.IsTextPresent("TestUsers131"));
        }
コード例 #28
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void AddUserBad3()
        {
            Selenium.Click("link=Create User");
            Selenium.WaitForPageToLoad("30000");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_UserName", "TestUser12");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_Password", "1111");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_ConfirmPassword", "111");
            Selenium.Type("ctl00_MainContent_CreateUserWizard1_CreateUserStepContainer_Email", "asdsad");
            Selenium.Click("ctl00_MainContent_CreateUserWizard1___CustomNav0_StepNextButtonButton");

            AssertHasText("The Password and Confirmation Password must match.");
            AssertIsOnPage("CreateUser.aspx", null);
        }
コード例 #29
0
ファイル: AdminTests.cs プロジェクト: nbl852003/iudico
        public void CreateNewGroupBad()
        {
            Selenium.Click("link=Create Group");
            Selenium.WaitForPageToLoad("5000");
            Selenium.Click("ctl00_MainContent_btnCreate");

            AssertIsOnPage("CreateGroup.aspx", null);

            Selenium.Click("//tr[@id='ctl00_MainMenun15']/td/table/tbody/tr/td/a");
            Selenium.WaitForPageToLoad("30000");

            AssertCountButtonOnPage();
        }
コード例 #30
0
        public void MyPermissionsUser()
        {
            Selenium.Click("link=My permissions");
            Selenium.WaitForPageToLoad("7000");

            AssertIsOnPage("MyPermissions.aspx", null);
            AssertHasText("Courses you have access to:");
            AssertHasText("Themes you have access to:");
            AssertHasText("Stages you have access to:");
            AssertHasText("Groups you have access to:");
            AssertHasText("Curriculums you have access to:");
            AssertCheckBoxState(true, "ctl00_MainContent_uplPermissions_ctl11_PermissionsGrid_ctl02_ctl00");
        }