예제 #1
0
 public void Test_CreateEditDeleteRole()
 {
     selenium.SetTimeout("100000");
     selenium.Open("Admin/tests/testreset.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/QuickSetup.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Click("link=Roles");
     selenium.WaitForPageToLoad("30000");
     selenium.Click("//input[@value='Create Role']");
     selenium.WaitForPageToLoad("30000");
     selenium.Type("ctl00_Body_ctl00_Name", "Test Role #1");
     selenium.Click("ctl00_Body_ctl00_SaveButton");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("successfully"), "Text 'successfully' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("Test Role #1"), "Text 'Test Role #1' not found when it should be.");
     selenium.Click("ctl00_Body_ctl00_IndexGrid_ctl04_EditButton");
     selenium.WaitForPageToLoad("30000");
     selenium.Type("ctl00_Body_ctl00_Name", "Test Role #1");
     selenium.Click("//input[@value='Update']");
     selenium.WaitForPageToLoad("30000");
     selenium.ChooseOkOnNextConfirmation();
     selenium.Click("ctl00_Body_ctl00_IndexGrid_ctl04_DeleteButton");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.GetConfirmation() != null && selenium.GetConfirmation().IndexOf("Are you sure you want to delete this role?") > -1, "Confirm box didn't appear when expected.");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("deleted successfully"), "Text 'deleted successfully' not found when it should be.");
     Assert.IsFalse(selenium.IsTextPresent("Test Role"), "Text 'Test Role' found when it shouldn't be.");
 }
예제 #2
0
 public void Test_RestrictAnonymousFromAccount()
 {
     selenium.SetTimeout("100000");
     selenium.Open("Admin/tests/testreset.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/QuickSetup.aspx");
     selenium.WaitForPageToLoad("30000");
     while (!selenium.IsTextPresent("Sign Out"))
     {
         Thread.Sleep(1000);
     }
     selenium.Click("SignOutLink");
     selenium.WaitForPageToLoad("30000");
     selenium.WaitForPageToLoad("30000");
     while (!selenium.IsTextPresent("Sign In"))
     {
         Thread.Sleep(1000);
     }
     selenium.Open("User-Details.aspx");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("not signed in"), "Text 'not signed in' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("Sign In Details"), "Text 'Sign In Details' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("User Name:"), "Text 'User Name:' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("Password:"******"Text 'Password:' not found when it should be.");
 }
예제 #3
0
 public void Test_Data()
 {
     selenium.SetTimeout("1000000");
     selenium.Open("Admin/tests/testreset.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/QuickSetup.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/Data.aspx");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("User-UserRole"), "Text 'User-UserRole' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("User"), "Text 'User' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("UserRole"), "Text 'UserRole' not found when it should be.");
     selenium.Click("link=User");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("SoftwareMonkeys.SiteStarter.Entities.User"), "Text 'SoftwareMonkeys.SiteStarter.Entities.User' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("*****@*****.**"), "Text '*****@*****.**' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("Username: admin"), "Text 'Username: admin' not found when it should be.");
     selenium.Click("link=Sign Out");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/Data.aspx");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("Sign In Details"), "Text 'Sign In Details' not found when it should be.");
 }
예제 #4
0
파일: OrderFixture.cs 프로젝트: rolyv/pwas
        public void CreateOrder()
        {
            RegisterAndLogin();
            selenium.Open("/customerView_Home.aspx");
            selenium.WaitForPageToLoad("5000");
            selenium.Click("ctl00_navigation_menu_NavigationControl_NavTreeViewt0");
            selenium.WaitForPageToLoad("5000");
            selenium.Type("ctl00_body_content_txtJobName", "Salsa Impulse");
            selenium.Type("ctl00_body_content_txtFinalSizeX", "5");
            selenium.Type("ctl00_body_content_txtFinalSizeY", "5");
            selenium.Type("ctl00_body_content_txtQty", "1000");
            selenium.Select("ctl00_body_content_lstWeight", "label=Light");
            selenium.Check("ctl00_body_content_chkTwoSide");
            selenium.Type("ctl00_body_content_FileUpload", "C:\\Documents and Settings\\Javier\\Desktop\\Salsa Impulse\\SalsaImpulseBusinessCard.jpg");
            selenium.Click("ctl00_body_content_btnFileUpload");

            selenium.WaitForPageToLoad("5000");
            Assert.IsTrue(selenium.IsTextPresent("Uploaded File:"));
            Assert.IsTrue(selenium.IsTextPresent("SalsaImpulseBusinessCard.jpg"));

            selenium.Click("ctl00_body_content_createPay");
            selenium.WaitForPageToLoad("5000");

            int count = orderRepo.Orders.Where(o => o.job_name == "Salsa Impulse").Count();

            Assert.AreEqual(1, count);

            Order order = orderRepo.Orders.Where(o => o.job_name == "Salsa Impulse").Single();

            Assert.AreEqual("Salsa Impulse", order.job_name.Trim());
            Assert.AreEqual(5.0, order.width);
            Assert.AreEqual(5.0, order.height);
            Assert.AreEqual(1000, order.quantity);
            Assert.IsTrue(order.two_sided);
        }
 public void Test_Roles()
 {
     selenium.SetTimeout("100000");
     selenium.Open("Admin/tests/testreset.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/QuickSetup.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("MockCreate-User.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Click("link=Roles");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("Manage Roles"), "Text 'Manage Roles' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("Edit"), "Text 'Edit' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("Delete"), "Text 'Delete' not found when it should be.");
     selenium.Click("//input[@value='Create Role']");
     selenium.WaitForPageToLoad("30000");
     selenium.Type("ctl00_Body_ctl00_Name", "A Test Role");
     selenium.AddSelection("ctl00_Body_ctl00_Users", "label=FirstName1 LastName1");
     selenium.Click("//input[@value='Save']");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("saved successfully"), "Text 'saved successfully' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("Manage Roles"), "Text 'Manage Roles' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("Test Role"), "Text 'Test Role' not found when it should be.");
     selenium.Click("link=Edit");
     selenium.WaitForPageToLoad("30000");
     Assert.AreEqual("System Administrator", selenium.GetSelectedLabel("ctl00_Body_ctl00_Users"));
     selenium.AddSelection("ctl00_Body_ctl00_Users", "FirstName1 LastName1");
     selenium.Click("//input[@value='Update']");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("updated successfully"), "Text 'updated successfully' not found when it should be.");
     selenium.Click("link=Edit");
     selenium.WaitForPageToLoad("30000");
     Assert.AreEqual("FirstName1 LastName1,System Administrator", String.Join(",", selenium.GetSelectedLabels("ctl00_Body_ctl00_Users")));
 }
예제 #6
0
            public void Upload(string mFileToUpload)
            {
                path = Properties.Settings.Default.ContentPath;
                if (mFileToUpload == "")
                {
                    return;
                }
                selenium.Open("/Default.aspx");

                if (selenium.IsTextPresent("Sign In"))
                {
                    selenium.Click("ctl00_LoginStatus1");
                    selenium.WaitForPageToLoad("30000");
                    selenium.Type("ctl00_ContentPlaceHolder1_Login1_Login1_UserName", Properties.Settings.Default._3DRUserName);
                    selenium.Type("ctl00_ContentPlaceHolder1_Login1_Login1_Password", Properties.Settings.Default._3DRPassword);
                    selenium.Click("ctl00_ContentPlaceHolder1_Login1_Login1_LoginButton");
                }
                selenium.WaitForPageToLoad("30000");
                selenium.Open("/Users/Upload.aspx");
                selenium.WaitForPageToLoad("30000");
                selenium.Type("ctl00_ContentPlaceHolder1_Upload1_TitleTextBox", "Automatic Test of " + mFileToUpload + " " + System.DateTime.Now.ToString());



                SetUploadFile(path + mFileToUpload);



                selenium.Click("ctl00_ContentPlaceHolder1_Upload1_Step1NextButton");
                selenium.WaitForPageToLoad("1200000");
                selenium.WaitForCondition("window.GetLoadingComplete != undefined", "300000");
                int count = 0;

                while ((selenium.GetEval("window.GetLoadingComplete() == true") != "true" && count < 300))
                {
                    count++;
                    System.Threading.Thread.Sleep(1000);
                }

                if (selenium.GetEval("window.GetLoadingComplete() == true") == "true")
                {
                    selenium.GetEval("window.TakeScreenShot();");
                    System.Threading.Thread.Sleep(3000);
                    //count = 0;
                    //string Thumbstring = selenium.GetEval("document.getElementById('ctl00_ContentPlaceHolder1_Upload1_ThumbnailImage')");
                    //while (Thumbstring.IndexOf("ScreenShot") == -1 && count < 10)
                    //{
                    //    count++;
                    //    System.Threading.Thread.Sleep(1000);
                    //    Thumbstring = selenium.GetEval("document.getElementById('ctl00_ContentPlaceHolder1_Upload1_ThumbnailImage')");
                    //}
                }



                //  ctl00_ContentPlaceHolder1_Upload1_ThumbnailImage
                selenium.Click("ctl00_ContentPlaceHolder1_Upload1_ValidationViewSubmitButton");
                selenium.WaitForPageToLoad("1200000");
            }
예제 #7
0
 public void StandartLoginValid()
 {
     selenium.Open("/");
     selenium.Type("id=loginPassword", "lex");
     selenium.Type("id=loginUsername", "lex");
     selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsElementPresent("//a[contains(@href, '/Account/Index')]"));
 }
예제 #8
0
        private void setupBrowser()
        {
            // NOTE: These base URLs only work for systems who happen to have the same integration and localhost suffix (For example, localhost/RlePersonnel and integration.redstapler.biz/RlePersonnel).
            // Systems like MITCalendar will not work until we come up with a better solution.

            // NOTE: This should not be hard-coded.
            var baseUrl = "https://integration.redstapler.biz/";

            if (ConfigurationStatics.IsDevelopmentInstallation)
            {
                if (ConfigurationStatics.InstallationConfiguration.WebApplications.Any(wa => wa.SupportsSecureConnections))
                {
                    baseUrl = "https://localhost/";
                }
                else
                {
                    baseUrl = "http://localhost/";
                }
            }


            selenium = new DefaultSelenium("localhost" /*location of Selenium server*/, 4444, @"*firefox3 C:\Program Files (x86)\Mozilla Firefox\firefox.exe", baseUrl);
            selenium.Start();

            if (ConfigurationStatics.IsIntermediateInstallation)
            {
                executeSeleniumBlock(
                    "Intermediate log on",
                    delegate {
                    // NOTE: We need to go to the specific URL here instead of relying on a redirect, or Selenium will time out or otherwise fail (it sucks at following redirects).
                    selenium.Open("/" + ConfigurationStatics.InstallationConfiguration.SystemShortName + "/Ewf/IntermediateLogIn.aspx?ReturnUrl=");
                    // NOTE: Does not work for MIT Calendar, etc.
                    selenium.Type("ctl00_ctl00_main_contentPlace_ctl12_theTextBox", ConfigurationStatics.SystemGeneralProvider.IntermediateLogInPassword);
                    // NOTE: Move g8Summit to machine configuration file.
                    SubmitForm(selenium);
                    selenium.WaitForPageToLoad("30000");
                });
            }
            if (UserManagementStatics.UserManagementEnabled /* && FormsAuthStatics.FormsAuthEnabled */)
            {
                executeSeleniumBlock(
                    "Forms log on",
                    delegate {
                    // NOTE: System-name approach suffers from same problem as above.
                    selenium.Open("/" + ConfigurationStatics.InstallationConfiguration.SystemShortName + "/Ewf/UserManagement/LogIn.aspx?ReturnUrl=");

                    // NOTE: I don't think we need waits after opens.
                    selenium.WaitForPageToLoad("30000");
                    Assert.IsTrue(selenium.GetTitle().EndsWith("Log In"));
                    // NOTE: For RSIS, we need the ability to pass a different email address and a different password for testing.
                    //selenium.Type( "ctl00_ctl00_main_contentPlace_emailAddress_theTextBox", ConfigurationStatics.SystemGeneralProvider.FormsLogInEmail );
                    //selenium.Type( "ctl00_ctl00_main_contentPlace_password_theTextBox", ConfigurationStatics.SystemGeneralProvider.FormsLogInPassword );
                    SubmitForm(selenium);
                    selenium.WaitForPageToLoad("30000");
                });
            }
        }
예제 #9
0
        /// <summary>
        /// Opens the specified URI.
        /// </summary>
        /// <param name="uri">The URI.</param>
        public void Open(Uri uri)
        {
            if (uri == null)
            {
                throw new ArgumentNullException("uri");
            }

            _selenium.Open(uri.AbsoluteUri);
        }
 public void Test_Initialize()
 {
     selenium.SetTimeout("2000000");
     selenium.Open("Admin/tests/testreset.aspx?Log=true&amp;Config=true");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     selenium.Open("Admin/InitializeCache.aspx");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
 }
예제 #11
0
파일: Account.cs 프로젝트: nbl852003/iudico
 public void GetCurrentlyLoggedInUserWhenLogged()
 {
     selenium.Open("/");
     selenium.Type("id=loginPassword", "lex");
     selenium.Type("id=loginUsername", "lex");
     selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsElementPresent("//a[contains(@href, '/Account/Index')]"));
     Assert.IsTrue(selenium.IsTextPresent("Logged in as lex"));
 }
예제 #12
0
 public void Test_TestBreakableLogging()
 {
     selenium.SetTimeout("1000000");
     selenium.Open("Admin/Tests/TestReset.aspx?Log=true");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/QuickSetup.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/Tests/TestBreakableLogging.aspx");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     selenium.Open("");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     selenium.Open("Admin/Tests/LogContains.aspx?Query=Test group %231");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("LogContains=True"), "Text 'LogContains=True' not found when it should be.");
     selenium.Open("Admin/Tests/LogContains.aspx?Query=Test group %232");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("LogContains=True"), "Text 'LogContains=True' not found when it should be.");
     selenium.Open("Admin/Tests/LogContains.aspx?Query=Test group %233");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("LogContains=True"), "Text 'LogContains=True' not found when it should be.");
     selenium.Open("Admin/Tests/LogContains.aspx?Query=Test entry %231");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("LogContains=True"), "Text 'LogContains=True' not found when it should be.");
     selenium.Open("Admin/Tests/LogContains.aspx?Query=Test entry %232");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("LogContains=True"), "Text 'LogContains=True' not found when it should be.");
 }
예제 #13
0
 public void Test_Update()
 {
     selenium.SetTimeout("1000000");
     selenium.Open("Admin/Tests/TestReset.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/QuickSetup.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Click("link=Users");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsFalse(selenium.IsTextPresent("aren't authorised"), "Text 'aren't authorised' found when it shouldn't be.");
     selenium.Click("//input[@value='Create User']");
     selenium.WaitForPageToLoad("30000");
     selenium.Type("ctl00_Body_ctl00_FirstName", "another");
     selenium.Type("ctl00_Body_ctl00_LastName", "user");
     selenium.Type("ctl00_Body_ctl00_Email", "*****@*****.**");
     selenium.Type("ctl00_Body_ctl00_Username", "anotheruser");
     selenium.Type("ctl00_Body_ctl00_Password", "pass");
     selenium.Type("ctl00_Body_ctl00_PasswordConfirm", "pass");
     selenium.AddSelection("ctl00_Body_ctl00_UserRoles", "label=Administrator");
     selenium.Click("//input[@value='Save']");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("successfully"), "Text 'successfully' not found when it should be.");
     selenium.Click("link=Roles");
     selenium.WaitForPageToLoad("30000");
     selenium.Click("ctl00_Body_ctl00_CreateButton");
     selenium.WaitForPageToLoad("30000");
     selenium.Type("ctl00_Body_ctl00_Name", "another role");
     selenium.AddSelection("ctl00_Body_ctl00_Users", "label=another user");
     selenium.Click("//input[@value='Save']");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("successfully"), "Text 'successfully' not found when it should be.");
     selenium.Click("UpdateApplicationLink");
     selenium.WaitForPageToLoad("30000");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("Application Update"), "Text 'Application Update' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("current application version"), "Text 'current application version' not found when it should be.");
     selenium.Click("//input[@value='Begin »']");
     selenium.WaitForPageToLoad("30000");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("Ready for Upload"), "Text 'Ready for Upload' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("Your data has been backed up"), "Text 'Your data has been backed up' not found when it should be.");
     selenium.Click("//input[@value='Continue »']");
     selenium.WaitForPageToLoad("30000");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("Update Complete"), "Text 'Update Complete' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("successfully"), "Text 'successfully' not found when it should be.");
     selenium.Click("link=Users");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("anotheruser"), "Text 'anotheruser' not found when it should be.");
     selenium.Click("link=Roles");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("another role"), "Text 'another role' not found when it should be.");
 }
 public void Test_Setup()
 {
     selenium.SetTimeout("100000");
     selenium.Open("Admin/tests/testreset.aspx?Log=true&amp;Config=true");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     selenium.Open("Admin/QuickSetup.aspx");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("You are signed in as"), "Text 'You are signed in as' not found when it should be.");
     Thread.Sleep(5000);
 }
예제 #15
0
 public void Test_AutoBackup()
 {
     selenium.SetTimeout("1000000");
     selenium.Open("Admin/tests/testreset.aspx?Log=true&amp;Config=true");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/QuickSetup.aspx");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     selenium.Open("");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Thread.Sleep(10000);
     selenium.Open("Admin/tests/LogContains.aspx?Query=%3CData%3E${BackupComplete}%3C/Data%3E");
     Assert.IsTrue(selenium.IsTextPresent("LogContains=True"), "Text 'LogContains=True' not found when it should be.");
     Assert.IsTrue(selenium.IsTextPresent("FoundTotal=1"), "Text 'FoundTotal=1' not found when it should be.");
 }
예제 #16
0
        public void RegistrationAndLoginTest()
        {
            selenium.Open("/index.aspx");
            selenium.WaitForPageToLoad("10000");
            selenium.Click("link=Login");
            selenium.WaitForPageToLoad("10000");
            selenium.Click("link=Register");
            selenium.WaitForPageToLoad("5000");
            selenium.Type("ctl00_body_content_txtEmailAddress", "*****@*****.**");
            selenium.Type("ctl00_body_content_txtPassword", "12345");
            selenium.Type("ctl00_body_content_txtPasswordConfirm", "12345");
            selenium.Type("ctl00_body_content_txtFirstName", "Javier");
            selenium.Type("ctl00_body_content_txtLastName", "Mesa");
            selenium.Type("ctl00_body_content_txtCompanyName", "XYZ Printing");
            selenium.Type("ctl00_body_content_txtPhoneNumber", "7862986707");
            selenium.Type("ctl00_body_content_txtBillAddressLine1", "2601 W 2nd Ave");
            selenium.Type("ctl00_body_content_txtBillCity", "Hialeah");
            selenium.Type("ctl00_body_content_txtBillState", "FL");
            selenium.Type("ctl00_body_content_txtBillZipCode", "33010");
            selenium.Click("ctl00_body_content_btnRegister");
            selenium.WaitForPageToLoad("5000");


            int count = userRepo.Users.Where(u => u.email.Trim() == "*****@*****.**").Count();

            Assert.AreEqual(1, count);

            User newUser = userRepo.Users.Where(u => u.email.Trim() == "*****@*****.**").Single();

            Assert.AreEqual("Javier", newUser.firstName.Trim());
            Assert.AreEqual("Mesa", newUser.lastName.Trim());
            Assert.AreEqual("82-7C-CB-0E-EA-8A-70-6C-4C-34-A1-68-91-F8-4E-7B", newUser.password.Trim());
            Assert.AreEqual("XYZ Printing", newUser.company.Trim());
            Assert.AreEqual("7862986707", newUser.homePhone.Trim());
            Assert.AreEqual("2601 W 2nd Ave", newUser.b_address1.Trim());
            Assert.AreEqual("Hialeah", newUser.b_city.Trim());
            Assert.AreEqual("FL", newUser.b_state.Trim());
            Assert.AreEqual("33010", newUser.b_zip.Trim());

            selenium.Open("/index.aspx");
            selenium.WaitForPageToLoad("5000");
            selenium.Click("link=Login");
            selenium.WaitForPageToLoad("5000");
            selenium.Type("ctl00_body_content_loginEmail", "*****@*****.**");
            selenium.Type("ctl00_body_content_pwd", "12345");
            selenium.Click("ctl00_body_content_loginSubmit");
            selenium.WaitForPageToLoad("5000");

            Assert.IsTrue(selenium.IsTextPresent("Welcome back Javier"));
        }
 public void Test_Import()
 {
     selenium.SetTimeout("1000000");
     selenium.Open("Admin/tests/testreset.aspx?Log=true&amp;Config=true");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/QuickSetup.aspx");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     selenium.Open("Admin/Tests/PrepareTestImport.aspx");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     selenium.Open("Admin/Import.aspx");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     Assert.IsTrue(selenium.IsTextPresent("Import Complete"), "Text 'Import Complete' not found when it should be.");
 }
예제 #18
0
        public void SetupClass()
        {
            base.StartServer();
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", ConfigurationManager.AppSettings["baseUrl"]);
            selenium.Start();
            verificationErrors = new StringBuilder();

            selenium.DeleteAllVisibleCookies();

            selenium.Open("/dna/mbfood/");
            // To Do
            // too general, could crash test if a topic happened to have the wrong name 
            Assert.IsFalse(selenium.IsTextPresent("error"));
            Assert.IsFalse(selenium.IsTextPresent("There has been a problem"));

            selenium.Click("link=Sign in");
            selenium.Click("bbcid_username");
            selenium.Type("bbcid_username", "mpgsuper");
            selenium.Type("bbcid_password", "ratbags");
            selenium.Click("signin");
            selenium.WaitForPageToLoad("30000");

            // going this way so as to be certain to get the right site options without thinking about it
            selenium.Click("link=Site Options");
            selenium.WaitForPageToLoad("30000");

            // check a) where we are b) BBC site requirements for page titles https://confluence.dev.bbc.co.uk/display/DNA/Meta+Data - note that this title breaks those guidelines
            Assert.AreEqual("BBC - Food - DNA Administration - Site Options - Food", selenium.GetTitle());
            Assert.IsTrue(selenium.IsElementPresent("//input[@name='sov_49_General_CustomBarlesquePath']");

            stateOfOption = selenium.GetValue("//input[@name='so_49_General_CustomBarlesquePath' and @type='radio' and @checked='']/@value");
            valueOfOption = selenium.GetValue("//input[@name='so_49_General_CustomBarlesquePath' and @type='text']");
        }
 public void SetUp()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://localhost");
     selenium.Start();
     selenium.Open("http://localhost");
     silvernium = new Silvernium(selenium, "Test");
 }
예제 #20
0
 public void SetUp()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://localhost");
     selenium.Start();
     selenium.Open("http://localhost");
     silvernium = new Silvernium(selenium, "Test");
 }
예제 #21
0
        // UpdateResourceFile("pradeep","@E:\AdminScripts\ECommerce_CodeBase\PreRequisite_Suite\Resources\Customers.resx");

        /// <summary> To Launch the browser & to login to Open Bet application
        /// </summary>
        ///  Author: Yogesh
        /// Ex: AdminBase.init()
        /// <returns>None</returns>
        /// Created Date: 22-Dec-2011
        /// Modified Date:
        /// Modification Comments:
        public void Init()
        {
            if (FrameGlobals.useGrid.ToUpper() == "YES")
            {
                FirefoxProfile      ffProfile            = new FirefoxProfile();
                DesiredCapabilities desriredCapibilities = null;
                desriredCapibilities = new DesiredCapabilities();
                desriredCapibilities = DesiredCapabilities.Firefox();
                desriredCapibilities.SetCapability(CapabilityType.BrowserName, "firefox");
                // ffProfile.SetPreference("general.useragent.override", FrameGlobals.userAgentValue);

                FfDriver  = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), desriredCapibilities, TimeSpan.FromSeconds(420.0));
                MyBrowser = new WebDriverBackedSelenium(FfDriver, "http://www.google.com"); //_seleniumContainer.Add(Gallio.Framework.TestContext.CurrentContext.Test.Name, MyBrowser);
            }
            else
            {
                FfDriver  = new FirefoxDriver();
                MyBrowser = new WebDriverBackedSelenium(FfDriver, FrameGlobals.OBUrl);
                //MyBrowser = new WebDriverBackedSelenium(FfDriver, "https://stg-gib.ladbrokes.com/admin");
            }
            MyBrowser.Start();
            MyBrowser.Open(FrameGlobals.OBUrl);
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Type(AdminSuite.CommonControls.AdminHomePage.UsrNmeTxtBx, FrameGlobals.AdminName);
            MyBrowser.Type(AdminSuite.CommonControls.AdminHomePage.PwdTxtBx, FrameGlobals.AdminPass);
            // MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Click(AdminSuite.CommonControls.AdminHomePage.LoginBtn);
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut.ToString());
            // MyBrowser.WindowMaximize();
            FfDriver.Manage().Window.Maximize();
        }
예제 #22
0
 public void TheTest_seleniumCSTest(string idUser)
 {
     selenium.Open("/KARA_WEB/deconnexion.do");
     selenium.Type("idUtilisateur", idUser);
     selenium.Type("motDePasse", "2697");
     selenium.Click("B1");
     selenium.WaitForPageToLoad("30000");
     selenium.Click("bt_4_0");
     selenium.WaitForPageToLoad("30000");
     selenium.Type("dateNaissJ", "21");
     selenium.Type("dateNaissM", "04");
     selenium.Type("dateNaissA", "1987");
     selenium.Type("nom", "SINCLAR");
     selenium.Type("prenom", "BOB");
     selenium.Click("//img[@onclick='ChangerOnglet(2)']");
     selenium.Type("numVoie", "ICI");
     selenium.Type("codePostal", "32456");
     selenium.Type("burDistr", "ICI");
     selenium.Click("//img[@onclick='ChangerOnglet(3)']");
     selenium.Type("numICCID", "89331059970000209012");
     selenium.Type("numIMEI", "111111111111119");
     selenium.Click("B2");
     selenium.WaitForPageToLoad("30000");
     selenium.Click("//img[@onclick='valider()']");
     selenium.WaitForPageToLoad("30000");
 }
 public void Test_Settings()
 {
     selenium.SetTimeout("1000000");
     selenium.Open("Admin/tests/testreset.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Admin/QuickSetup.aspx");
     selenium.WaitForPageToLoad("30000");
     selenium.Click("link=Settings");
     selenium.WaitForPageToLoad("30000");
     Assert.IsFalse(selenium.IsTextPresent("Exception"), "Text 'Exception' found when it shouldn't be.");
     selenium.Click("link=Sign Out");
     selenium.WaitForPageToLoad("30000");
     selenium.Open("Index-Settings.aspx");
     selenium.WaitForPageToLoad("30000");
     Assert.IsTrue(selenium.IsTextPresent("Sign In Details"), "Text 'Sign In Details' not found when it should be.");
 }
예제 #24
0
        public void Init()
        {
            //Deleting cookies in ie browser through command line.
            /*var procStartInfo = new System.Diagnostics.ProcessStartInfo("cmd", "/c RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2");
            var proc = new System.Diagnostics.Process { StartInfo = procStartInfo };
            proc.Start();
            WebDriverObj = new InternetExplorerDriver();
            */
            string URL = "https://stg-gib.ladbrokes.com/admin";
            WebDriverObj = new FirefoxDriver();
            MyBrowser = new WebDriverBackedSelenium(WebDriverObj, URL);
            MyBrowser.Start();
            WebDriverObj.Manage().Window.Maximize();
            MyBrowser.WindowMaximize();

            MyBrowser.Open(URL);
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Refresh();
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Type(TestDataCreation.ControlsRepository.UsrNmeTxtBx, "Automation1");
            MyBrowser.Type(TestDataCreation.ControlsRepository.PwdTxtBx, "aditi123");
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
            MyBrowser.Click(TestDataCreation.ControlsRepository.LoginBtn);
            MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
        }
예제 #25
0
 public void SetUp()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", URL);
     selenium.Start();
     selenium.Open(URL);
     silvernium = new Silvernium(selenium, OBJECTID, SCRIPTKEY);
 }
예제 #26
0
 public void TheTectscompleteTest()
 {
     selenium.Open("/_int_/config_to.html");
     selenium.Click("id=aggressive");
     selenium.Type("id=serverlist", "10.105.74.54");
     selenium.Click("link=Submit");
 }
 public void SetUp()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", URL);
     selenium.Start();
     selenium.Open(URL);
     silvernium = new Silvernium(selenium, OBJECTID, SCRIPTKEY);
 }
예제 #28
0
            public void PolygonCount(
                [Values(
                     "duffle_bag.zip"
                     )]
                string mFileToUpload
                )
            {
                path = Properties.Settings.Default.ContentPath;
                if (mFileToUpload == "")
                {
                    return;
                }
                selenium.Open("/Default.aspx");

                if (selenium.IsTextPresent("Sign In"))
                {
                    selenium.Click("ctl00_LoginStatus1");
                    selenium.WaitForPageToLoad("30000");
                    selenium.Type("ctl00_ContentPlaceHolder1_Login1_Login1_UserName", Properties.Settings.Default._3DRUserName);
                    selenium.Type("ctl00_ContentPlaceHolder1_Login1_Login1_Password", Properties.Settings.Default._3DRPassword);
                    selenium.Click("ctl00_ContentPlaceHolder1_Login1_Login1_LoginButton");
                }
                selenium.WaitForPageToLoad("30000");
                selenium.Open("/Users/Upload.aspx");
                selenium.WaitForPageToLoad("30000");
                selenium.Type("ctl00_ContentPlaceHolder1_Upload1_TitleTextBox", "Screenshot Test" + System.DateTime.Now.ToString());
                selenium.Type("ctl00_ContentPlaceHolder1_Upload1_ContentFileUpload", path + mFileToUpload);
                selenium.Click("ctl00_ContentPlaceHolder1_Upload1_Step1NextButton");
                selenium.WaitForPageToLoad("300000");
                selenium.WaitForCondition("window.GetLoadingComplete != undefined", "20000");
                int count = 0;

                while ((selenium.GetEval("window.GetLoadingComplete() == true") != "true" && count < 30))
                {
                    count++;
                    System.Threading.Thread.Sleep(1000);
                }

                NUnit.Framework.Assert.AreEqual(selenium.GetEval("window.GetLoadingComplete() == true"), "true");



                selenium.Click("ctl00_ContentPlaceHolder1_Upload1_ValidationViewSubmitButton");
                selenium.WaitForPageToLoad("30000");

                NUnit.Framework.Assert.IsFalse(selenium.IsTextPresent("Number of Polygons: 0"));
            }
예제 #29
0
 public void TheConnexionTestTest(string idUser, string pass)
 {
     selenium.Open("/KARA_WEB/deconnexion.do");
     selenium.Type("idUtilisateur", idUser);
     selenium.Type("motDePasse", pass);
     selenium.Click("B1");
     selenium.WaitForPageToLoad("30000");
 }
예제 #30
0
 public void TheNewTest()
 {
     selenium.Open("/");
     selenium.Type("q", "selenium rc");
     selenium.Click("btnG");
     selenium.WaitForPageToLoad("30000");
     Console.WriteLine("selenium rc - Google Search" + "/Vs/" + selenium.GetTitle());
 }
예제 #31
0
 public void TheLoginFail_CamposVaciosTest()
 {
     selenium.Open("/");
     Assert.AreEqual("Log in", selenium.GetText("css=h2.login-header"));
     selenium.Click("css=input[type=\"submit\"]");
     selenium.WaitForPageToLoad("30000");
     Assert.AreEqual("Ingrese datos de campos faltantes", selenium.GetText("css=div.validation-summary-errors"));
 }
예제 #32
0
 /// <summary>
 /// Instantiates a new Home Page object. Pass in the Selenium object created in the test SetUp().
 /// When the object in instantiated it will navigate to the root
 /// </summary>
 /// <param name="selenium">Selenium Object created in the tests
 public Home(ISelenium selenium)
 {
     this._selenium = selenium;
     if (!selenium.GetTitle().Contains("home"))
     {
         selenium.Open("/");
     }
 }
예제 #33
0
 public void WithValidData()
 {
     selenium.Open("/");
     selenium.Type("id=loginPassword", "lex");
     selenium.Type("id=loginUsername", "lex");
     selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
     selenium.WaitForPageToLoad(UpgradeSeleniumTester.browserWait);
     selenium.Click("//a[contains(@href, '/Account/Index')]");
     selenium.WaitForPageToLoad(UpgradeSeleniumTester.browserWait);
     selenium.Click("//a[contains(@href, '/Account/Edit')]");
     selenium.WaitForPageToLoad(UpgradeSeleniumTester.browserWait);
     selenium.Type("id=Name", "nestor");
     selenium.Type("id=Email", "*****@*****.**");
     selenium.Click("//input[@value='Save']");
     selenium.WaitForPageToLoad(UpgradeSeleniumTester.browserWait);
     Assert.IsTrue(selenium.IsTextPresent("nestor"));
 }
예제 #34
0
            public void Test(
                [Values(
                     "desk.zip",
                     "desk_and_chair.zip",
                     "desk_chair.zip",
                     "glowing_pointer.zip",
                     "info_booth.zip",
                     "exit_sign.zip",
                     "jeep_full.zip",
                     "jeep_windows_down.zip",
                     "news_stand.zip",
                     "street_fighter_arcade.zip",
                     "q70_chair.zip"
                     )]
                string mFileToUpload)
            {
                if (mFileToUpload == "")
                {
                    return;
                }
                selenium.Open("/Default.aspx");

                path = Properties.Settings.Default.ContentPath;

                if (selenium.IsTextPresent("Sign In"))
                {
                    selenium.Click("ctl00_LoginStatus1");
                    selenium.WaitForPageToLoad("30000");
                    selenium.Type("ctl00_ContentPlaceHolder1_Login1_Login1_UserName", Properties.Settings.Default._3DRUserName);
                    selenium.Type("ctl00_ContentPlaceHolder1_Login1_Login1_Password", Properties.Settings.Default._3DRPassword);
                    selenium.Click("ctl00_ContentPlaceHolder1_Login1_Login1_LoginButton");
                }
                selenium.WaitForPageToLoad("30000");
                selenium.Open("/Users/Upload.aspx");
                selenium.WaitForPageToLoad("30000");
                selenium.Type("ctl00_ContentPlaceHolder1_Upload1_TitleTextBox", "Automatic Test of " + mFileToUpload + " " + System.DateTime.Now.ToString());
                selenium.Type("ctl00_ContentPlaceHolder1_Upload1_ContentFileUpload", path + mFileToUpload);
                selenium.Click("ctl00_ContentPlaceHolder1_Upload1_Step1NextButton");
                selenium.WaitForPageToLoad("300000");


                //  ctl00_ContentPlaceHolder1_Upload1_ThumbnailImage
                selenium.Click("ctl00_ContentPlaceHolder1_Upload1_ValidationViewSubmitButton");
                selenium.WaitForPageToLoad("30000");
            }
예제 #35
0
 /// <summary>
 /// Instantiates a new Home Page object. Pass in the Selenium object created in the test SetUp(). 
 /// When the object in instantiated it will navigate to the root
 /// </summary>
 /// Selenium Object created in the tests
 public Home(ISelenium selenium)
 {
     this._selenium = selenium;
     if (!selenium.GetTitle().Contains("home"))
     {
         selenium.Open("/");
     }
     selenium.WindowMaximize();
 }
예제 #36
0
        public void SetupTest()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*firefox", url);
            selenium.SetSpeed("1000");
            selenium.Start();
            verificationErrors = new StringBuilder();
            selenium.Open("");
            selenium.WindowMaximize();

            //selenium.KeyDown(ID, "13");//enter key
        }
        public void Google_For_SimpleTalk(SeleniumProvider seleniumProvider)
        {
            Browser = seleniumProvider.GetBrowser();

            Browser.Open("/");
            Browser.Type("q", "Simple Talk");
            Browser.Click("btnG");

            Browser.WaitForPageToLoad("3000");

            Assert.True(Browser.IsTextPresent("www.simple-talk.com"));
        }
예제 #38
0
        public void SetupTest()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://127.0.0.1:1556/");
            selenium.Start();
            verificationErrors = new StringBuilder();

            selenium.Open("/");
			selenium.Type("id=loginPassword", "lex");
			selenium.Type("id=loginUsername", "lex");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("30000");
        }
예제 #39
0
        public void Login()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://127.0.0.1:1556/");
            selenium.Start();

            selenium.Open("/");
            selenium.Type("id=loginUsername", "prof");
            selenium.Type("id=loginPassword", "prof");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("30000");
            selenium.Click("link=Courses");
            selenium.WaitForPageToLoad("30000");
        }
예제 #40
0
        public void Login()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://127.0.0.1:1556/");
            selenium.Start();

            selenium.Open("/");
            selenium.Type("id=loginUsername", "lex");
            selenium.Type("id=loginPassword", "lex");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("30000");
            selenium.Click("//a[contains(@href, 'UserActivity/Index')]");
            selenium.WaitForPageToLoad("30000");
        }
예제 #41
0
 public void TestMethod3()
 {
     string URL = "http://www.abb.com";
     selenium = new DefaultSelenium("localhost", 4444, "*firefox", URL);
     selenium.Start();
     selenium.Open("/");
     Assert.AreEqual("The ABB Group - Automation and Power Technologies", selenium.GetTitle());
     selenium.Type("searchInput", "Robot");
     selenium.Click("search");
     selenium.WaitForPageToLoad("10000");
     Assert.AreEqual("The ABB Group", selenium.GetTitle());
     Assert.AreEqual("Robot", selenium.GetValue("searchInput"));
 }
예제 #42
0
 public void Init()
 {
     FfDriver = new FirefoxDriver();
     MyBrowser = new WebDriverBackedSelenium(FfDriver, "https://stg-gib.ladbrokes.com/admin");
     MyBrowser.Start();
     MyBrowser.Open("https://stg-gib.ladbrokes.com/admin");
     MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
     MyBrowser.Type(AdminSuite.CommonControls.AdminHomePage.UsrNmeTxtBx, "sanjeeva_p");
     MyBrowser.Type(AdminSuite.CommonControls.AdminHomePage.PwdTxtBx, "123456");
     MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
     MyBrowser.Click(AdminSuite.CommonControls.AdminHomePage.LoginBtn);
     MyBrowser.WaitForPageToLoad(FrameGlobals.PageLoadTimeOut);
 }
예제 #43
0
        public void Login()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", ConfigurationManager.AppSettings["SELENIUM_URL"]);
                selenium.Start();

            selenium.Open("/");
            selenium.Type("id=loginUsername", "lex");
            selenium.Type("id=loginPassword", "lex");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("30000");
            selenium.Click("//a[contains(@href, 'UserActivity/Index')]");
            selenium.WaitForPageToLoad("30000");
        }
예제 #44
0
        public void Login()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", ConfigurationManager.AppSettings["SELENIUM_URL"]);
            selenium.Start();

            selenium.Open("/");
            selenium.Type("id=loginUsername", "prof");
            selenium.Type("id=loginPassword", "prof");
            selenium.Click("//div[@id='logindisplay']/form[2]/input[3]");
            selenium.WaitForPageToLoad("40000");
            selenium.Click("link=Courses");
            selenium.WaitForPageToLoad("40000");
        }
예제 #45
0
        public void StartSelenium()
        {
            verificationErrors = new StringBuilder();

            string platform = System.Configuration.ConfigurationManager.AppSettings["Platform"];
            this.URL = System.Configuration.ConfigurationManager.AppSettings["TestURL"];
            //get un/pw from db
            //this.UN = "";
            //this.PW = "";

            selenium = new DefaultSelenium("localhost", 4444, platform, this.URL);
            //selenium = new DefaultSelenium("localhost", 4444, "*firefox3 C:\\Program Files\\Mozilla Firefox\\firefox.exe", "http://dev.lofinc.net");
            selenium.Start();
            Thread.Sleep(5000);
            selenium.WindowMaximize();

            selenium.SetTimeout("0");
            selenium.Open("/admin/");
            this.selenium.WaitForPageToLoad("5000");
        }
예제 #46
0
        public void TestMethod1()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://www.google.com/");
            selenium.Start();

            selenium.Open("/");
            selenium.Type("q", "selenium rc");
            selenium.Click("btnG");
            selenium.WaitForPageToLoad("30000");
            Assert.AreEqual("selenium rc - Google Search", selenium.GetTitle());

            try
            {
                selenium.Stop();
            }
            catch (Exception)
            {
                // Ignore errors if unable to close the browser
            }
        }
예제 #47
0
        public void TestMethod2()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://localhost:1987");
            selenium.Start();
            selenium.Open("/WebSite1/");
            selenium.Type("MainContent_TextBox1", "HUM");
            selenium.Click("MainContent_Button1");
            selenium.WaitForPageToLoad("3000770");

            //Get the Table Value of Row 1 and Coulumn 2
            object GG = selenium.GetTable("MainContent_GridView1.1.2");

            Assert.AreEqual("1", "1");
            try
            {
                selenium.Stop();
            }
            catch (Exception)
            {
                // Ignore errors if unable to close the browser
            }
        }
예제 #48
0
		public void SetupTest()
		{
			selenium = new DefaultSelenium("localhost", 4444, "*mock", startURL);
			selenium.Start();
			selenium.Open(startURL + "/selenium-server/tests/html/test_i18n.html");
		}
예제 #49
0
 //[SetUp]
 public void SetUp()
 {
     driver = new FirefoxDriver();
     selenium = new WebDriverBackedSelenium(driver, URL);
     selenium.Start();
     selenium.Open(URL);
     driver.Navigate().GoToUrl(URL);
     //silvernium = new Silvernium(selenium, OBJECTID, SCRIPTKEY);
 }
        private void setupBrowser()
        {
            // NOTE: These base URLs only work for systems who happen to have the same integration and localhost suffix (For example, localhost/RlePersonnel and integration.redstapler.biz/RlePersonnel).
            // Systems like MITCalendar will not work until we come up with a better solution.

            // NOTE: This should not be hard-coded.
            var baseUrl = "https://integration.redstapler.biz/";

            if( ConfigurationStatics.IsDevelopmentInstallation ) {
                if( ConfigurationStatics.InstallationConfiguration.WebApplications.Any( wa => wa.SupportsSecureConnections ) )
                    baseUrl = "https://localhost/";
                else
                    baseUrl = "http://localhost/";
            }

            selenium = new DefaultSelenium( "localhost" /*location of Selenium server*/, 4444, @"*firefox3 C:\Program Files (x86)\Mozilla Firefox\firefox.exe", baseUrl );
            selenium.Start();

            if( ConfigurationStatics.IsIntermediateInstallation ) {
                executeSeleniumBlock(
                    "Intermediate log on",
                    delegate {
                        // NOTE: We need to go to the specific URL here instead of relying on a redirect, or Selenium will time out or otherwise fail (it sucks at following redirects).
                        selenium.Open( "/" + ConfigurationStatics.InstallationConfiguration.SystemShortName + "/Ewf/IntermediateLogIn.aspx?ReturnUrl=" );
                        // NOTE: Does not work for MIT Calendar, etc.
                        selenium.Type( "ctl00_ctl00_main_contentPlace_ctl12_theTextBox", ConfigurationStatics.SystemGeneralProvider.IntermediateLogInPassword );
                        // NOTE: Move g8Summit to machine configuration file.
                        SubmitForm( selenium );
                        selenium.WaitForPageToLoad( "30000" );
                    } );
            }
            if( UserManagementStatics.UserManagementEnabled && FormsAuthStatics.FormsAuthEnabled ) {
                executeSeleniumBlock(
                    "Forms log on",
                    delegate {
                        // NOTE: System-name approach suffers from same problem as above.
                        selenium.Open( "/" + ConfigurationStatics.InstallationConfiguration.SystemShortName + "/Ewf/UserManagement/LogIn.aspx?ReturnUrl=" );

                        // NOTE: I don't think we need waits after opens.
                        selenium.WaitForPageToLoad( "30000" );
                        Assert.IsTrue( selenium.GetTitle().EndsWith( "Log In" ) );
                        // NOTE: For RSIS, we need the ability to pass a different email address and a different password for testing.
                        selenium.Type( "ctl00_ctl00_main_contentPlace_emailAddress_theTextBox", ConfigurationStatics.SystemGeneralProvider.FormsLogInEmail );
                        selenium.Type( "ctl00_ctl00_main_contentPlace_password_theTextBox", ConfigurationStatics.SystemGeneralProvider.FormsLogInPassword );
                        SubmitForm( selenium );
                        selenium.WaitForPageToLoad( "30000" );
                    } );
            }
        }
예제 #51
0
 public void StartSession()
 {
     selenium = SeleniumProvider.GetClient();
     selenium.Open(Constants.RootUrl);
 }
예제 #52
0
 public void TestMethod4()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://localhost:1987");
     selenium.Start();
     selenium.Open("/WebSite1/");
     selenium.Type("MainContent_TextBox1", "HUM");
     selenium.Click("MainContent_Button1");
     selenium.WaitForPageToLoad("3000770");
     object GG = selenium.GetTable("MainContent_GridView1.1.2");
     Assert.AreEqual("1", "1");
 }
예제 #53
0
        public void SetupTest()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://145.24.222.148/login");

            selenium.Start();
            verificationErrors = new StringBuilder();
            selenium.Open("/login");
            selenium.Type("name=username", "blu");
            selenium.Type("name=password", "blu");
        }