Exemple #1
0
        internal void NotEmployed()
        {
            Thread.Sleep(3000);

            Assert.AreEqual("KiwiSaver Retirement Calculator", formName);
            GlobalDefinitions.TurnOnWait();

            GlobalDefinitions.driver.SwitchTo().Frame(0);

            txtCurrentAge.SendKeys(GlobalDefinitions.ExcelLib.ReadData(4, "Currrent Age"));
            ddEmploymentStatus.Click();
            GlobalDefinitions.TurnOnWait();

            ddlNotEmployed.Click();
            GlobalDefinitions.TurnOnWait();

            txtCurrentKiwiSaverBalance.SendKeys(GlobalDefinitions.ExcelLib.ReadData(4, "Current KiwiSaver Balance"));
            txtVoluntaryContributions.SendKeys(GlobalDefinitions.ExcelLib.ReadData(4, "Voluntary  Contributions"));
            ddFrequency.Click();
            ddlAnnually.Click();
            rdoBalanced.Click();
            txtSavingsGoal.SendKeys(GlobalDefinitions.ExcelLib.ReadData(4, "Savings goal at retirement"));
        }
Exemple #2
0
        internal void LanguageEdit()
        {
            // Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ProfilePage");

            //Click Language tab
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//a[@data-tab='first']"));
            ClickLang.Click();
            EditLang.Click();

            //Add new Language
            AddLang.Clear();
            AddLang.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Language"));

            //Add new Level
            SelectLevel.Click();
            SelectLevel.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Level"));

            //Click update
            UpdateLang.Click();

            GlobalDefinitions.wait(40);
        }
            public void DeleteShareSkillNotDeleted()
            {
                GlobalDefinitions.TurnOnWait();

                Profile profile = new Profile();

                profile.NavigateToManageListingpage();

                GlobalDefinitions.TurnOnWait();

                ManageListings ml = new ManageListings();

                GlobalDefinitions.wait(1000);
                ml.DeleteSharedSkill();

                GlobalDefinitions.TurnOnWait();
                GlobalDefinitions.wait(1000);
                ml.DeleteSharedSkillNo();

                GlobalDefinitions.TurnOnWait();
                GlobalDefinitions.wait(1000);
                ml.VerifyNotDeleted();
            }
Exemple #4
0
        internal void InvalidLoginSteps()
        {
            GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/div[1]/div[2]/div/a[2]/button")).Click();
            //Click on Join button
            GlobalDefinitions.wait(20);
            Assert.IsTrue(SignIntab.Enabled);
            SignIntab.Click();
            GlobalDefinitions.wait(50);
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(@"C:\Users\Owner\source\repos\marsframework-master\MarsFramework-master\MarsFramework\ExcelData\TestDataShareSkill.xlsx", "SignIn");
            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Username"));

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

            // Thread.Sleep(2000);
            //Click on Login
            LoginBtn.Click();
            IWebElement Submitbtn = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='submit-btn']"));

            Assert.IsTrue(Submitbtn.Enabled);
        }
        internal void DeleteValidation()
        {
            String expectedValue = GlobalDefinitions.ExcelLib.ReadData(3, "Title");

            //Get the list
            IList <IWebElement> Trows = driver.FindElements(By.XPath("//table/tbody/tr"));

            //Get the row
            var rows = Trows.Count;

            for (int i = 1; i <= rows; i++)
            {
                //Get the xpath of ith row
                String actualValue = driver.FindElement(By.XPath("//table/tbody/tr[" + i + "]/td[3]")).Text;

                //validation
                if (actualValue != expectedValue)
                {
                    Assert.Pass();
                }
            }
            GlobalDefinitions.wait(30);
        }
Exemple #6
0
        internal void VerifyDeleteNotification(IWebDriver driver)
        {
            // Record the elements qty
            Thread.Sleep(2000);
            var notification          = driver.FindElements(By.XPath("//h4[contains(text(),'Service Request')]"));
            int NotificationQtyUpdate = notification.Count();

            Debug.WriteLine("The qty of notification after deletion:" + NotificationQtyUpdate);

            // Judge if the qty is decreased by 1
            GlobalDefinitions.WaitForElement(driver, "XPath", "//h4[contains(text(), 'Service Request')]", 10);
            Thread.Sleep(1000);

            if (NotificationQtyUpdate == NotificationQty - 1)
            {
                Base.test.Log(LogStatus.Pass, "Verify delete notification successfully!");
            }
            else
            {
                Base.test.Log(LogStatus.Fail, "Failed to verify delete notification successfully!");
                Assert.Fail("Failed to verify delete notification successfully!");
            }
        }
    public ShooterGameTarget(TargetInfo Target) : base(Target)
    {
        Type = TargetType.Game;
        DefaultBuildSettings = BuildSettingsVersion.V2;
        ExtraModuleNames.AddRange(new string[] { "ShooterGame", "AccelByteUe4Sdk", "AccelByteCustomWebBrowserWidget", "Agones" });

        if (Target.Platform == UnrealTargetPlatform.PS4)
        {
            GlobalDefinitions.Add("GARLIC_HEAP_SIZE=(2600ULL * 1024 * 1024)");
            GlobalDefinitions.Add("ONION_HEAP_SIZE=(200ULL * 1024 * 1024)");
            GlobalDefinitions.Add("RESERVED_MEMORY_SIZE=(1ULL * 1024 * 1024)");
            GlobalDefinitions.Add("LIBC_MALLOC_SIZE=(32ULL * 1024 * 1024)");
            GlobalDefinitions.Add("LIBC_MALLOC_SIZE=(32ULL * 1024 * 1024)");

            //for a real game these could be behind a call to a virtual function defined in a partial class in a protected folder also.
            GlobalDefinitions.Add("UE4_PROJECT_NPTITLEID=NPXX51358_00");
            GlobalDefinitions.Add("UE4_PROJECT_NPTITLESECRET=81ae213eafbc64777574955bf921c9be3c60a3bddef70c357d8fe49ad64e0d0402d2249de390174832c5e4098114c93c33705b597cfbe9b1153d58fe9fae1f0de1466daf18ef25d06122cff7c95bde07bc060109e20c865305692dfbf9d7b726460893c4abd86dc9e8fd6b5db7dca4ffd4eefcb1771baccd576109bea862d6d4");
        }
        else if (Target.Platform == UnrealTargetPlatform.Win64 || Target.Platform == UnrealTargetPlatform.Win32)
        {
            bUsesSteam = true;
        }
    }
Exemple #8
0
        /// <summary>
        /// This routine takes the selectedUnit and places it at the destination hex selected
        /// </summary>
        public void GetUnitSetupDestination(GameObject selectedUnit, GameObject targetHex)
        {
            if ((targetHex != null) && (VerifyValidHex(selectedUnit, targetHex)))
            {
                // If the unit already occupies a hex (not gauranteed since this is setup) need
                // to remove it from the hex so it isn't counting against stacking when it isn't there
                if (selectedUnit.GetComponent <UnitDatabaseFields>().occupiedHex != null)
                {
                    GeneralHexRoutines.RemoveUnitFromHex(selectedUnit, selectedUnit.GetComponent <UnitDatabaseFields>().occupiedHex);
                }

                GeneralHexRoutines.PutUnitOnHex(selectedUnit, targetHex);
            }
            GlobalDefinitions.UnhighlightUnit(selectedUnit);

            if (targetHex != null)
            {
                // Move the unit to be on the board
                selectedUnit.transform.parent = GlobalDefinitions.allUnitsOnBoard.transform;
                selectedUnit.GetComponent <UnitDatabaseFields>().inBritain = false;
                selectedUnit = null;
            }
        }
Exemple #9
0
        public void AddEducationSteps()
        {
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Educations");
            EducationSection.Click();
            EduAddNewEduBtn.Click();
            EducationCollege.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "College/University"));
            Thread.Sleep(10000);
            EducationCountry.Click();
            SelectElement country = new SelectElement(EducationCountry);

            country.SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "Country of College/University"));
            EducationTitle.Click();
            SelectElement title = new SelectElement(EducationTitle);

            title.SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "Title"));
            EducationDegree.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Degree"));
            EducationYear.Click();
            SelectElement year = new SelectElement(EducationYear);

            year.SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "Year of graduation"));
            AddEduBtn.Click();
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//div[contains(@class,'ns-box ns-growl ns-effect-jelly ns-type-success ns-show')]"), 10);
        }
Exemple #10
0
        internal void VerifyViewListing()
        {
            try
            {
                // Wait element turn up
                IWebElement titleOnPage = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='service-detail-section']//h1/span"));
                GlobalDefinitions.WaitForTextPresentInElement(GlobalDefinitions.driver, titleOnPage, titleFirstRow, 10);

                // Verify category, title, description
                var categoryOnPage = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='service-detail-section']" +
                                                                                   "//div[1]/div[2]/div[2]//div[2]/div/div[1]/div/div[2]")).Text;
                Assert.That(categoryOnPage, Is.EqualTo(categoryFirstRow));

                Assert.That(titleOnPage.Text, Is.EqualTo(titleFirstRow));

                var descriptionOnPage = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='service-detail-section']" +
                                                                                      "//div[2]/div/div/div[1]/div/div/div/div[2]")).Text;
                Assert.That(descriptionOnPage, Contains.Substring(descriptionFirstRow.Substring(0, descriptionFirstRow.Length - 3)));
            }catch (Exception ex)
            {
                Assert.Fail("Test failed to verify viewing listing", ex.Message);
            }
        }
Exemple #11
0
        /// <summary>
        /// User selects Main Menu from the static gui
        /// </summary>
        public void GoToMainMenu()
        {
            // If this is a network game and the player isn't in control do not allow to reset.  Player has to quit to exit in this case.
            if (!GlobalDefinitions.localControl && (GlobalDefinitions.gameMode == GlobalDefinitions.GameModeValues.Peer2PeerNetwork))
            {
                GlobalDefinitions.GuiUpdateStatusMessage("Cannot reset game when not in control");
                return;
            }

            // Turn off the button so that the same gui can't be pulled up
            GlobalDefinitions.mainMenuButton.GetComponent <Button>().interactable = false;

            // Turn off any guis that are on
            if (GUIRoutines.guiList.Count > 0)
            {
                foreach (GameObject gui in GUIRoutines.guiList)
                {
                    gui.SetActive(false);
                }
            }

            GlobalDefinitions.AskUserYesNoQuestion("Are you sure you want to quit?", ref yesButton, ref noButton, YesMain, NoMain);
        }
    public HeadlessChaosTarget(TargetInfo Target) : base(Target)
    {
        Type     = TargetType.Program;
        LinkType = TargetLinkType.Monolithic;

        ExeBinariesSubFolder = "NotForLicensees";
        LaunchModuleName     = "HeadlessChaos";

        bBuildDeveloperTools = false;

        // HeadlessChaos doesn't ever compile with the engine linked in
        bCompileAgainstEngine      = false;
        bCompileAgainstCoreUObject = true;

        bHasExports = false;

        bUseLoggingInShipping = true;

        // UnrealHeaderTool is a console application, not a Windows app (sets entry point to main(), instead of WinMain())
        bIsBuildingConsoleApplication = true;

        GlobalDefinitions.Add("CHAOS_SERIALIZE_OUT=1");
    }
Exemple #13
0
        //Enter the Description in Profile Section
        internal void AddDescription()
        {
            //Clicking on Edit button
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//h3[text()='Description']//i[@class='outline write icon']", 6);
            EditDescription.Click();
            Thread.Sleep(1000);

            //Clearing the description textarea if any text already existing
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//textarea[@name='value']", 6);
            DescriptionTextBox.Clear();

            //Entering new description
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//textarea[@name='value']", 6);
            DescriptionTextBox.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ProfileDescription"));

            //Clicking on Save button
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "XPath", "//h3[text()='Description']/../..//button[text()='Save']", 6);
            SaveDescription.Click();
            string img = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Profile Description");

            //Validate message
            GlobalDefinitions.MessageValidation("Description has been saved successfully");
        }
Exemple #14
0
        internal void ViewandDeleteListings()
        {
            //Wait
            GlobalDefinitions.wait(10);

            //Click on Manage Listing tab under Profile page
            manageListingsButton.Click();

            //Click on View button and send to View page
            view.Click();

            //Go back to Manage Listing page from View page
            Base.Back();

            //Click on Active slider
            ActiveSlider.Click();

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

            //Popup come up after clicking delete button and click yes button
            clickActionsButton.Click();
        }
        internal void CheckDetails(int DataRow)
        {
            //Prepares the Excel Sheet
            GlobalDefinitions.PopulateInCollection(Base.ExcelPath, "ShareSkill");

            //Creates a result variable
            bool CheckResult = true;

            //Compares description with expected description
            if (Description.Text != GlobalDefinitions.ReadData(DataRow, "Description"))
            {
                CheckResult = false;
            }

            if (CheckResult == true)
            {
                Assert.Pass();
            }
            else
            {
                Assert.Fail();
            }
        }
 internal void Listings()
 {
     GlobalDefinitions.wait(2000);
     manageListingsLink.Click();
     Thread.Sleep(2000);
     while (true)
     {
         for (int i = 1; i < 5; i++)
         {
             IWebElement ela   = GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[" + i + "]/td[3]"));
             String      Eleme = ela.Text;
             if (Eleme == "Java")
             {
                 GlobalDefinitions.wait(2000);
                 GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[1]/table/tbody/tr[" + i + "]/td[8]/div/button[1]/i")).Click();
                 servicemanageListingsLink.Click();
                 return;
             }
         }
         Thread.Sleep(2000);
         GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='listing-management-section']/div[2]/div[1]/div[2]/button[10]")).Click();
     }
 }
Exemple #17
0
        internal void description()
        {
            // Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ProfilePage");

            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//i[@class='outline write icon'])[1]"));
            //Click Description
            Description.Click();

            GlobalDefinitions.wait(40);
            Descriptiontext.Clear();
            //Enter Description
            Descriptiontext.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description"));
            DescriptionSave.Click();
            //Assert
            GlobalDefinitions.wait(40);
            //String des = Desc.Text;
            //Assert.IsTrue(des.Contains(GlobalDefinitions.ExcelLib.ReadData(2, "Description")));
            String addMessage         = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='ns-box ns-growl ns-effect-jelly ns-type-success ns-show']//div")).Text;
            String expectedAddMessage = "Description has been saved successfully";

            Assert.AreEqual(addMessage, expectedAddMessage);
        }
Exemple #18
0
    public UnrealLightmassTarget(TargetInfo Target) : base(Target)
    {
        Type     = TargetType.Program;
        LinkType = TargetLinkType.Modular;
        AdditionalPlugins.Add("UdpMessaging");
        LaunchModuleName = "UnrealLightmass";

        // Lean and mean
        bCompileLeanAndMeanUE = true;

        // Never use malloc profiling in Unreal Header Tool.  We set this because often UHT is compiled right before the engine
        // automatically by Unreal Build Tool, but if bUseMallocProfiler is defined, UHT can operate incorrectly.
        bUseMallocProfiler = false;

        // No editor needed
        bBuildEditor = false;
        // Editor-only data, however, is needed
        bBuildWithEditorOnlyData = true;

        // Currently this app is not linking against the engine, so we'll compile out references from Core to the rest of the engine
        bCompileAgainstEngine = false;
        //bCompileAgainstCoreUObject = false;

        if (Target.Platform == UnrealTargetPlatform.Mac || Target.Platform == UnrealTargetPlatform.Linux)
        {
            // On Mac/Linux UnrealLightmass is executed locally and communicates with the editor using Messaging module instead of SwarmAgent
            // Plugins and developer tools are needed for that
            bCompileWithPluginSupport = true;
            bBuildDeveloperTools      = true;
        }

        // UnrealHeaderTool is a console application, not a Windows app (sets entry point to main(), instead of WinMain())
        bIsBuildingConsoleApplication = true;

        // Disable logging, lightmass will create its own unique logging file
        GlobalDefinitions.Add("ALLOW_LOG_FILE=0");
    }
Exemple #19
0
        internal void SearchSharedSkill()
        {
            Extension.WaitForElementDisplayed(Driver, By.CssSelector("input[placeholder='Search skills']"), 2);

            //Enter the title in search skill field and press enter
            SearchSkills.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title") + "\n");
            Extension.WaitForElementDisplayed(Driver, By.XPath("//b[text()='All Categories']/following-sibling::span"), 2);
            Thread.Sleep(2000);

            //Validate if All categories count is greater than 0
            GlobalDefinitions.ValidateBoolean(int.Parse(AllCategoriesCount.Text) > 0, "All Categories shown");

            //Validate Category and subcategory added count is greater than 0 when searched
            foreach (IWebElement Category in CategoriesList)
            {
                string CategoryValue = Category.Text.Replace(Category.FindElement(By.XPath("./*")).Text, "").TrimEnd();

                if (CategoryValue.ToLower() == GlobalDefinitions.ExcelLib.ReadData(2, "Category").ToLower())
                {
                    Category.Click();
                    GlobalDefinitions.ValidateBoolean(int.Parse(Category.FindElement(By.XPath("span")).Text) > 0, "Category shown");
                    IList <IWebElement> SubCategoryList = Driver.FindElements(By.XPath("//a[@role='listitem'][@class='item subcategory']"));
                    foreach (IWebElement SubCategory in SubCategoryList)
                    {
                        string SubCategoryValue = SubCategory.Text.Replace(SubCategory.FindElement(By.XPath("./*")).Text, "").TrimEnd();
                        if (SubCategoryValue.ToLower() == GlobalDefinitions.ExcelLib.ReadData(2, "SubCategory").ToLower())
                        {
                            SubCategory.Click();
                            GlobalDefinitions.ValidateBoolean(int.Parse(SubCategory.FindElement(By.XPath("span")).Text) > 0, "SubCategory Shown");
                            Base.Image = SaveScreenShotClass.SaveScreenshot(Driver, "Report");
                            break;
                        }
                    }
                    break;
                }
            }
        }
    public UnrealHeaderToolTarget(TargetInfo Target) : base(Target)
    {
        Type             = TargetType.Program;
        LinkType         = TargetLinkType.Modular;
        LaunchModuleName = "UnrealHeaderTool";

        // Lean and mean
        bCompileLeanAndMeanUE = true;

        // Never use malloc profiling in Unreal Header Tool.  We set this because often UHT is compiled right before the engine
        // automatically by Unreal Build Tool, but if bUseMallocProfiler is defined, UHT can operate incorrectly.
        bUseMallocProfiler = false;

        // No editor needed
        bCompileICU  = false;
        bBuildEditor = false;
        // Editor-only data, however, is needed
        bBuildWithEditorOnlyData = true;

        // Currently this app is not linking against the engine, so we'll compile out references from Core to the rest of the engine
        bCompileAgainstEngine          = false;
        bCompileAgainstApplicationCore = false;

        // Force execption handling across all modules.
        bForceEnableExceptions = true;

        // Plugin support
        bCompileWithPluginSupport = true;
        bBuildDeveloperTools      = true;

        // UnrealHeaderTool is a console application, not a Windows app (sets entry point to main(), instead of WinMain())
        bIsBuildingConsoleApplication = true;

        GlobalDefinitions.Add("HACK_HEADER_GENERATOR=1");

        GlobalDefinitions.Add("USE_LOCALIZED_PACKAGE_CACHE=0");
    }
        public void Register()
        {
            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "SignUp");
            // GlobalDefinitions.driver.Navigate().GoToUrl(GlobalDefinitions.ExcelOperations.ReadData(1,"url"));
            Thread.Sleep(1000);

            //Click on Join button
            Join.Click();
            Thread.Sleep(1000);

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "FirstName"));
            Thread.Sleep(1000);

            //Enter LastName;
            LastName.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "LastName"));
            Thread.Sleep(1000);

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Email"));
            Thread.Sleep(1000);

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Confirm"));
            Thread.Sleep(1000);

            //Click on Checkbox
            Checkbox.Click();
            Thread.Sleep(1000);

            //Click on join button to Sign Up
            JoinBtn.Click();
            Thread.Sleep(1000);
        }
        //
        internal void ChangePassword()
        {
            //Retrieving new password, confirm password and current passowrd value from excel
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ChangePassword");
            String CurrentPasswordValue = GlobalDefinitions.ExcelLib.ReadData(2, "Password");
            String NewPasswordValue     = GlobalDefinitions.ExcelLib.ReadData(2, "NewPassword");
            String ConfirmPasswordValue = GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPassword");

            //Moving curser to Userwelcom link
            Actions actions = new Actions(GlobalDefinitions.driver);

            Thread.Sleep(4000);
            GenericWait.ElementIsVisible(GlobalDefinitions.driver, "Xpath", "//span[contains(@class,'item ui dropdown link')]", 3);
            actions.MoveToElement(UserWelcomeLink).Build().Perform();

            //Clicking on the change password link
            GenericWait.ElementIsClickable(GlobalDefinitions.driver, "LinkText", "Change Password", 3);
            Thread.Sleep(2000);
            ChangePasswordLink.Click();

            //Entering the current password
            CurrentPasswordTextbox.SendKeys(CurrentPasswordValue);

            //Entering the new password
            NewPasswordTextbox.SendKeys(NewPasswordValue);

            //Entering the confirm password
            ConfirmPasswordTextbox.SendKeys(ConfirmPasswordValue);

            //clicking on the save button
            SaveButton.Click();

            string img = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Change Password");

            //Validating message
            GlobalDefinitions.MessageValidation("Password Changed Successfully");
        }
Exemple #23
0
        public void EditSkills()
        {
            Global.ExcelLib.PopulateInCollection(Base.ExcelPath, "AddSkills");

            GlobalDefinitions.Wait();
            SkillLink.Click();

            //This list gets the number of rows from the table
            //IList<IWebElement> rows = GlobalDefinitions.driver.FindElements(By.XPath(".//tr"));

            //This loop finds the first row which' title matches sRowValue
            IList <IWebElement> rows = GlobalDefinitions.driver.FindElements(By.XPath(".//tr"));

            //This loop finds the first row which' title matches sRowValue
            for (int i = 1; i < rows.Count; i++)
            {
                String sValue = GlobalDefinitions.driver.FindElement(By.XPath("//td[contains(text(),'C#')]")).Text;
                if (sValue == ExcelLib.ReadData(2, "Skill"))
                {
                    IWebElement Edit = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='ui bottom attached tab segment tooltip-target active']//tbody[1]//tr[1]//td[3]//span[1]//i[1]"));
                    Edit.Click();
                    AddSkillText.Clear();
                    AddSkillText.SendKeys(ExcelLib.ReadData(7, "Skill"));
                    UpdateSkill.Click();
                    break;
                }
            }
            GlobalDefinitions.Wait();
            IWebElement AddAlertPopup = GlobalDefinitions.driver.FindElement(By.ClassName("ns-box-inner"));
            String      AlertText     = AddAlertPopup.Text;

            GlobalDefinitions.Wait();
            Assert.IsTrue(AlertText.Contains("updated"));
            Console.WriteLine(AlertText);
            //saving screenshot
            var ScreenshotPath = Global.SaveScreenshot.SaveScreenshotClass(GlobalDefinitions.driver, "Edit is successful");
        }
Exemple #24
0
        public void UpdatedListing()
        {
            manageListing.Click();
            //Populate data from Excel
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SkillShare");

            SkillSharePage updSkillObj = new SkillSharePage();

            //wait for manage listing
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//h2[contains(text(),'Manage Listings')]"), 10);

            while (true)
            {
                for (int j = 1; j <= 5; j++)

                {
                    GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//tr[1]//td[3]"), 10);
                    var categoryObj = Global.GlobalDefinitions.driver.FindElement(By.XPath("//tr[" + j + "]//td[2]")).Text;
                    var titleObj    = GlobalDefinitions.driver.FindElement(By.XPath("//tr[" + j + "]//td[3]")).Text;

                    IWebElement updateListing = GlobalDefinitions.driver.FindElement(By.XPath("//tr[" + j + "]//td[8]//i[2]"));
                    GlobalDefinitions.wait(10);
                    if (titleObj == "ttt" && categoryObj == "Programming & Tech")
                    {
                        //wait for update btn
                        GlobalDefinitions.waitUntilClickable(GlobalDefinitions.driver, 1000, "(//tr[" + j + "]//td[8]//i[2])", "XPath");
                        updateListing.Click();
                        GlobalDefinitions.wait(10);
                        updSkillObj.SkillShare();
                        Base.Test.Log(LogStatus.Pass, "Skill updated successfully, Test passed");
                        return;
                    }
                }
                //click next page
                nextPageBtn.Click();
            }
        }
Exemple #25
0
        internal void EduEdit()
        {
            // Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ProfilePage");

            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//a[@data-tab='third']"));
            //Click Education tab
            ClickEdu.Click();
            EditEdu.Click();

            //Edit University
            University.Clear();
            University.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "University"));

            //Edit Country
            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//select[@name='country'])"));
            SelectElement Edit = new SelectElement(Country);

            Edit.SelectByText(GlobalDefinitions.ExcelLib.ReadData(3, "Country"));
            // Country.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Country"));

            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//select[@name='title'])"));
            //Edit Title
            // EditTitle.Click();
            Title.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Title"));

            //Edit Degree
            Degree.Clear();
            Degree.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Degree"));

            //Edit year
            //EditYear.Click();
            Year.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "YearOfGraduation"));

            //Click update
            UpdateEdu.Click();
        }
        internal void SearchSkillsByFilters(IWebDriver driver)
        {
            // Wait and click on Search icon
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//i[@class='search link icon']", 10);
            SearchIcon.Click();

            // Wait and check total results
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//*[@id='service-search-section']//div[2]/div/button[2]", 10);
            totalResults = int.Parse(driver.FindElement(By.XPath("//*[@id='service-search-section']//" +
                                                                 "div[1]/div[1]/div/a[1]/span")).Text);

            // Check online results
            FilterOnline.Click();
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//*[@id='service-search-section']//div[2]/div/button[2]", 10);
            onlineResults = int.Parse(driver.FindElement(By.XPath("//*[@id='service-search-section']//" +
                                                                  "div[1]/div[1]/div/a[1]/span")).Text);

            // Check onsite results
            FilterOnsite.Click();
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//*[@id='service-search-section']//div[2]/div/button[2]", 10);
            onsiteResults = int.Parse(driver.FindElement(By.XPath("//*[@id='service-search-section']//" +
                                                                  "div[1]/div[1]/div/a[1]/span")).Text);

            // Check show all results
            FilterShowAll.Click();
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//*[@id='service-search-section']//div[2]/div/button[2]", 10);
            showAllResults = int.Parse(driver.FindElement(By.XPath("//*[@id='service-search-section']//" +
                                                                   "div[1]/div[1]/div/a[1]/span")).Text);

            // Extent report
            Base.test.Log(LogStatus.Pass, "Search skills by filter successfully!");
        }
    public UnrealCEFSubProcessTarget(TargetInfo Target) : base(Target)
    {
        Type             = TargetType.Program;
        LinkType         = TargetLinkType.Monolithic;
        LaunchModuleName = "UnrealCEFSubProcess";

        // Change the undecorated exe name to be the shipping one on windows
        UndecoratedConfiguration = UnrealTargetConfiguration.Shipping;

        // Turn off various third party features we don't need

        // Currently we force Lean and Mean mode
        bBuildDeveloperTools = false;

        // Currently this app is not linking against the engine, so we'll compile out references from Core to the rest of the engine
        bCompileAgainstEngine      = false;
        bCompileAgainstCoreUObject = false;
        bBuildWithEditorOnlyData   = true;

        // Never use malloc profiling in CEFSubProcess.
        bUseMallocProfiler = false;

        // Force all shader formats to be built and included.
        //bForceBuildShaderFormats = true;

        // CEFSubProcess is a console application, not a Windows app (sets entry point to main(), instead of WinMain())
        bIsBuildingConsoleApplication = false;

        // Disable logging, as the sub processes are spawned often and logging will just slow them down
        GlobalDefinitions.Add("ALLOW_LOG_FILE=0");

        // Epic Games Launcher needs to run on OS X 10.9, so CEFSubProcess needs this as well
        bEnableOSX109Support = true;

        // Already a manifest specified through resource file
        WindowsPlatform.ManifestFile = null;
    }
        internal void SkillBtn()
        {
            //Check share skill button is present or not

            try
            {
                //Check ShareSkill button is displayed
                if (ShareSkillBtn.Displayed)
                {
                    //Click on  ShareSkill button
                    ShareSkillBtn.Click();
                    //Check whether navigated to Share Skill page
                    GlobalDefinitions.wait(2);

                    //Assert.That(driver.FindElement(By.XPath("//div[@id='service-listing-section']/div[2]/div/form/div/div/div/h3")).Displayed);

                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Navigated to share skill page ");
                    string screenshotpath = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Navigated to share skill page");
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Snapshot below:" + Base.test.AddBase64ScreenCapture(screenshotpath));

                    SkillsSharePage skillPage = new SkillsSharePage();
                    skillPage.AddNewSkill();
                }
                else
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "could not Navigated to share skill page ");
                    string screenshotpath = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "could not Navigated to share skill page");
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Snapshot below:" + Base.test.AddBase64ScreenCapture(screenshotpath));
                }
            }
            catch (Exception e)
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Could not Navigated to share skill page " + e.Message);
                string screenshotpath = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Could not Navigated to share skill page");
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Snapshot below:" + Base.test.AddBase64ScreenCapture(screenshotpath));
            }
        }
        // Send Request
        internal void SendRequest(IWebDriver driver)
        {
            // Populate the excel data into system
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignIn");

            // Wait and click on Search icon
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//i[@class='search link icon']", 10);
            SearchIcon.Click();

            // Wait and Enter name in Search user part
            GlobalDefinitions.WaitForElement(driver, "XPath",
                                             "//input[@placeholder='Search user']", 10);
            SearchUserInput.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Name"));

            // Wait and Choosse the first one option
            Thread.Sleep(1000);
            DropdownFirstOpt.Click();

            // Wait and Choose the first one result
            GlobalDefinitions.WaitForElement(driver, "XPath",
                                             "//*[@id='service-search-section']//div[2]/div/div/div[1]/a/img", 10);
            ResultFirstOpt.Click();

            // Wait, Record Skill Name and Click on Request
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//div[@class='ui teal  button']", 10);
            skillTitle = driver.FindElement(By.ClassName("skill-title")).Text;

            RequestButton.Click();

            // Wait and click on YES
            GlobalDefinitions.WaitForElement(driver, "XPath",
                                             "//button[@role='button']", 10);
            ConfirmButtonYes.Click();
        }
        internal void EditShareSkill()
        {
            //Call CheckExistingSkillPresent method to check if any Share Skill is present, if not add a Share Skill
            CheckExistingSkillPresent();

            //Creating Share Skill Object
            ShareSkill shareSkill = new ShareSkill();

            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPathManageListing, "EditShareSkill");

            //Call SearchListings Method to get count for existing records with same category,title and description as we are going to update
            int MatchingRecordsBeforeEdit = SearchListings(GlobalDefinitions.ExcelLib.ReadData(2, "Category"), GlobalDefinitions.ExcelLib.ReadData(2, "Title"), GlobalDefinitions.ExcelLib.ReadData(2, "Description"));

            //Navigate to Manage Listing
            NavigateToManageListing();

            Thread.Sleep(2000);

            //Click the Edit icon
            Edit.Click();

            //Call EditShareSkillData method to add Edit data
            shareSkill.EditShareSkillData();

            //Call SaveShareSkill Method to save the Share Skill
            shareSkill.SaveShareSkill();

            //Call SearchListings Method to get count for records with same category,title and description as we edited
            int MatchingRecordsAfterEdit = SearchListings(GlobalDefinitions.ExcelLib.ReadData(2, "Category"), GlobalDefinitions.ExcelLib.ReadData(2, "Title"), GlobalDefinitions.ExcelLib.ReadData(2, "Description"));

            //checking if number of records with same category,title and description is 1 more than it has before
            int ExpectedRecords = MatchingRecordsBeforeEdit + 1;

            GlobalDefinitions.ValidateBoolean(ExpectedRecords == MatchingRecordsAfterEdit, "Share Skill Edited");
        }