コード例 #1
0
        internal void Register()
        {
            // Populate the Excel Data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Registration");
            Thread.Sleep(500);

            // Click the Join button on the Home page
            Join.Click();

            // Input the First name field with valid characters
            Firstname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Firstname"));

            // Input the Last name field with valid characters
            Lastname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Lastname"));

            // Input the Email address field with valid characters
            Emailaddress.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Emailaddress"));

            // Input the Password field with valid characters
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            // Input the Confirm Password field with valid characters
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPassword"));

            // Click the I agree to the terms and conditions checkbox
            Checkbox.Click();

            // Click the Join button on the Registration form page
            Joinbtn.Click();
        }
コード例 #2
0
        public void SignUpSteps()
        {
            CommonMethods.test = CommonMethods.extent.StartTest("Sign up steps test");

            //Populate the excel data
            ExcelLib.PopulateInCollection(ConstantUtils.TestDataPath, "SignUp");

            //Click on Join button
            Join.Click();

            // Wait
            CommonMethods.WaitForElement(Driver.driver, "Name", "firstName", 10);

            //Enter FirstName
            FirstName.SendKeys(ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
コード例 #3
0
        internal void register()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(@"C:\Users\Neelam\Desktop\Mars project\MarsFramework-master\MarsFramework\ExcelData\TestDataShareSkill.xlsx", "SignUp");
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
コード例 #4
0
        public void SpecifyResearchTypes(params TypeOfResearch[] researchTypes)
        {
            string name = "";

            foreach (var type in researchTypes)
            {
                switch (type)
                {
                case TypeOfResearch.BiomedicalClinical:
                {
                    name = "Biomedical";
                    break;
                }

                case TypeOfResearch.SocialBehavioralEducation:
                {
                    name = "Social";
                    break;
                }

                case TypeOfResearch.Other:
                {
                    name = "Other";
                    break;
                }
                }
                var chkbox = new Checkbox(By.XPath(".//td[contains(.,'" + name + "')]/../td/table/tbody/tr/td/input[1]"));
                chkbox.Click();
                Trace.WriteLine("Checking option: " + type);
            }
        }
コード例 #5
0
        /// <summary>
        /// Shared codebase -- same as SubmitRNICommitteeReview
        /// </summary>
        /// <param name="option"></param>
        public void SelectDetermination(Determinations value)
        {
            string name = "";

            switch (value)
            {
            case Determinations.UnanticipatedProblem: { name = "Unanticipated problem involving risks to subjects or others"; break; }

            case Determinations.SuspensionOrTermination: { name = "Suspension or termination of IRB approval"; break; }

            case Determinations.SeriousNonCompliance: { name = "Serious non-compliance"; break; }

            case Determinations.ContinuingNonCompliance: { name = "Continuing non-compliance"; break; }

            case Determinations.NonComplianceNotSerious: { name = "Non-compliance that is neither serious nor continuing"; break; }

            case Determinations.AllegationOfNonCompliance: { name = "Allegation of non-compliance with no basis in fact"; break; }

            case Determinations.NoneOfTheAbove: { name = "None of the above"; break; }

            case Determinations.AdditionalReviewRequired: { name = "Additional review required"; break; }
            }
            var chkbox = new Checkbox(By.XPath(".//td[text()='" + name + "']/../td/table/tbody/tr/td/input[1]"));

            chkbox.Click();
            Trace.WriteLine("Checking option: " + value);
        }
コード例 #6
0
        internal void register()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(MarsResources.ExcelPath, "SignUp");
            // Navigate to Url
            driver.Navigate().GoToUrl(GlobalDefinitions.ExcelLib.ReadData(2, "Url"));
            //Click on Join button
            Join.Click();
            Thread.Sleep(2000);

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "EmailAddress"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPassword"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
コード例 #7
0
        internal void register()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignUp");
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
コード例 #8
0
        internal void LoginSteps()
        {
            // Populate the Excel Data
            Global.GlobalDefinitions.ExcelLib.PopulateInCollection(Global.Base.ExcelPath, "SignIn");
            Thread.Sleep(500);

            // Click the Sign In link
            SignInLink.Click();

            // Input the Email address field with valid characters
            Email.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Emailaddress"));

            // Input the Password field with valid characters
            Password.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            // Tick the the Remember me? checkbox
            Checkbox.Click();

            // Click the Login button
            Login.Click();
            Thread.Sleep(1000);

            // Verify if sign in successfully
            IWebElement ProfilePage = GlobalDefinitions.driver.FindElement(By.XPath("//button[contains(@class,'button')][contains(text(),'Sign Out')]"));

            Assert.That(ProfilePage.Text, Is.EqualTo("Sign Out"));
        }
コード例 #9
0
        public void DeleteBackgroundOperation(String name)
        {
            var checkbox = new Checkbox(By.XPath("//a[text()='" + name + "']/../../td[1]/input"));

            checkbox.Click();
            BtnDelete.Click();
        }
コード例 #10
0
        internal void Register()
        {
            //extent Reports
            //Global.Base.test = Global.Base.extent.StartTest("Login Test");
            //Base.ExtentReports();

            //Click on Join button
            Join.Click();

            //Enter Firstname
            Firstname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Firstname"));

            //Enter Lastname
            Lastname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Lastname"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
コード例 #11
0
ファイル: Signup.cs プロジェクト: PallaviBindal/Standard_Task
        internal void register()
        {
            //Click on Join button
            Join.Click();
            Thread.Sleep(2000);

            //Enter FirstName
            FirstName.SendKeys(ExcelLibHelper.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(ExcelLibHelper.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(ExcelLibHelper.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(ExcelLibHelper.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(ExcelLibHelper.ReadData(2, "Confirm Password"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
コード例 #12
0
        internal void register()
        {
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(firstname);

            //Enter LastName
            LastName.SendKeys(lastname);

            //Enter Email
            Email.SendKeys(email);

            //Enter Password
            Password.SendKeys(password);

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(confirmpassword);

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
コード例 #13
0
ファイル: SignUp.cs プロジェクト: danielcwm/MarsFramework
        internal void Register()
        {
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
コード例 #14
0
ファイル: SignUp.cs プロジェクト: janiarrowdev/StandardTasks
        internal string register()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignUp");
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();

            return(Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/div[1]/a")).Text);
        }
コード例 #15
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="option"></param>
        public void ChooseResearchMilestone(params MileStones[] value)
        {
            string name = "";

            foreach (var milestone in value)
            {
                switch (milestone)
                {
                case MileStones.StudyPermanentlyClosedToEnrollment:
                {
                    name = "Study is permanently closed to enrollment OR was never open for enrollment";
                    break;
                }

                case MileStones.AllSubjectCompletedStudyRelatedInterventions:
                {
//                        name = @"
//	                    All subjects have completed all study-related interventions OR not applicable (e.g. study did not include interventions, no subjects were enrolled)";
                    name = @"All subjects have completed";
                    break;
                }

                case MileStones.CollectionOfPrivateInfoComplete:
                {
                    //name =
                    //    @"Collection of private identifiable information is complete OR not applicable (no subjects were enrolled)";
                    name = @"Collection of private";
                    break;
                }

                case MileStones.AnalysisOfPrivateInfoComplete:
                {
                    //name =
                    //    @"Analysis of private identifiable information is complete OR not applicable (no subjects were enrolled)";
                    name = @"Analysis of private";
                    break;
                }

                case MileStones.RemainingStudyActivitiesLimited:
                {
                    name = @"Remaining study activities are limited to data analysis";
                    break;
                }

                case MileStones.StudyRemainsActive:
                {
                    name = @"Study remains active only for long-term follow-up of subjects";
                    break;
                }
                }
                //var chkbox = new Checkbox(By.XPath(".//td[text()='" + name + "']/../td/table/tbody/tr/td/input[1]"));
                var chkbox = new Checkbox(By.XPath(".//td[contains(.,'" + name + "')]/../td/table/tbody/tr/td/input[1]"));
                chkbox.Click();
                Trace.WriteLine("Checking option: " + value);
            }
        }
コード例 #16
0
        public void ChooseModificationScope(Scope scope)
        {
            string name = "";

            if (scope == Scope.OtherPartsOfTheStudy)
            {
                name = "Other parts of the study";
            }
            if (scope == Scope.StudyTeamMemberInformation)
            {
                name = "Study team member information";
            }
            Checkbox scopePurpose = new Checkbox(By.XPath(".//td[text()='" + name + "']/../td[1]/table/tbody/tr/td/input[1]"));

            scopePurpose.Click();
        }
コード例 #17
0
        public DraftsPage DiscardAllDrafts()
        {
            WaitForDraftsListVisible();

            if (!DraftNotes.Count.Equals(0))
            {
                SelectAllCheckbox.Click();
                DiscardDraftsButton.Click();
                WaitForDraftsDissapeared();
            }
            else
            {
                Console.WriteLine("There is no drafts to discard.");
            }

            return(this);
        }
コード例 #18
0
        public void SelectRoles(params Roles[] roles)
        {
            string name = "";

            foreach (var role in roles)
            {
                switch (role)
                {
                case Roles.CoInvestigator:
                {
                    name = "Co-investigator";
                    break;
                }

                case Roles.DataAnalyst:
                {
                    name = "Data Analyst";
                    break;
                }

                case Roles.ResearchAssistant:
                {
                    name = "Research Assistant";
                    break;
                }

                case Roles.Statistician:
                {
                    name = "Statistician";
                    break;
                }

                case Roles.LayObserver:
                {
                    name = "Lay Observer";
                    break;
                }
                }
                var chkbox = new Checkbox(By.XPath(".//td[contains(.,'" + name + "')]/../td/table/tbody/tr/td/input[1]"));
                chkbox.Click();
                Trace.WriteLine("Checking option: " + role);
            }
        }
コード例 #19
0
        internal void register()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignUp");

            //string pth = System.Reflection.Assembly.GetCallingAssembly().CodeBase;
            //string actualPath = pth.Substring(0, pth.LastIndexOf("bin"));
            //string projectPath = new Uri(actualPath).LocalPath;

            //string ExclPath = projectPath + "ExcelData\\TestDataManageListings.xlsx";

            //GlobalDefinitions.ExcelLib.PopulateInCollection(ExclPath, "SignUp");


            GlobalDefinitions.driver.Navigate().GoToUrl(GlobalDefinitions.ExcelLib.ReadData(2, "Url"));

            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
コード例 #20
0
        public void CopyBranching(String sourceStepName, string targetStepName, String copyType = "all", Boolean eraseAll = false)
        {
            var btnAddBranch = new Button(
                By.XPath("(//*[@id='_webrRSV_DIV_0']/table/tbody/tr/td[3]/a[text()='" + sourceStepName +
                         "'])[1]/../../td[6]/input[@value='Copy Branches']"));

            btnAddBranch.Click();
            var popup = new CopyBranchesPopup();

            popup.SwitchTo();
            var chkTarget = new Checkbox(By.XPath("//span[text()='" + targetStepName + "']/../../td[1]/input[@type='checkbox']"));

            chkTarget.Click();
            var rdoCopyType = copyType == "smart" ? popup.RdoSmartCopy : popup.RdoAllBranches;

            rdoCopyType.Click();
            popup.ChkEraseExisting.Checked = eraseAll;
            popup.BtnOk.Click();
            popup.SwitchBackToParent(WaitForPopupToClose.Yes);
            Thread.Sleep(1500);
            WaitForPageLoad(5000);
        }
コード例 #21
0
        internal void Share_Skill()
        {
            Console.WriteLine("Start of shareSkill Method");

            //extent Reports
            // Base.test = Base.extent.StartTest("Login Test");

            //Click on ShareSkill
            Share_skill.Click();
            Thread.Sleep(2000);

            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ShareSkill");
            Thread.Sleep(1000);

            //Enter Title
            Title.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Title"));
            Thread.Sleep(1000);

            //Enter Description
            Description.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Description"));
            Thread.Sleep(1000);

            //Click on Category
            Category.Click();

            //Enter Category
            var selectElement = new SelectElement(Category);

            selectElement.SelectByText(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Category"));
            Thread.Sleep(2000);

            //Click on Sub Category
            SubCategory.Click();
            Thread.Sleep(3000);

            //Enter Sub Category
            var selectElementSub = new SelectElement(SubCategory);

            selectElementSub.SelectByText(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Sub Category"));
            Thread.Sleep(1000);

            //Click on tags
            Tags.Click();

            //Enter a tag
            Tags.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Tags"));

            //Select a Service Type
            ServiceType.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Service Type"));

            //Select Location Type
            locationType.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Location Type"));

            //Click on Avaliable days
            StartDate.Click();

            Thread.Sleep(1000);

            //Select Available days
            StartDate.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Start Date"));

            //Click on Sunday Checkbox
            Checkbox.Click();

            Thread.Sleep(1000);

            //Select Start Time
            StartTime.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Start Time"));

            //Select Skill Trade
            skillTrades.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Skill Trade"));

            //Select Skill-Exchange
            SkillExchange.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Skill Exchange"));

            Thread.Sleep(2000);

            //Click on plus icon of Work Samples
            Work_Samples.Click();

            Thread.Sleep(3000);

            //Call AutoIt to choose a file
            AutoItX.ControlFocus("Open", "", "Edit1");
            AutoItX.ControlSetText("Open", "", "Edit1", @"D:\kavya\AutoIt");
            AutoItX.ControlClick("Open", "", "Button1");

            //Select Active
            Active.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Active"));

            //Click on Save
            Save.Click();
        }
コード例 #22
0
 public void SelectFirstPerson()
 {
     firstUser.Click();
 }