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")); }
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")); }
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")); }
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")); }