// Regsitration Assertion method
        public void RegAssertion()
        {
            // Wait untill the successful message
            WaitHelpers.WaitClickableElement(Drivers.driver, "XPath", "//div[contains(text(),'Registration is successful')]");

            Assert.AreEqual(Drivers.driver.FindElement(By.XPath("//div[contains(text(),'Registration is successful')]")).Displayed, true);
        }
        // Update profile method
        public void UpdateProfile()
        {
            //Click on Profile button
            WaitHelpers.TurnOnWait();
            ProfileButton.Click();

            //Update FirstName
            WaitHelpers.WaitClickableElement(Drivers.driver, "XPath", "//input[@id='firstName']");
            FirstNameTextbox.Clear();
            FirstNameTextbox.SendKeys(Drivers.ExcelLib.ReadData(2, "Update FirstName"));

            //Update Last Name
            LastNameTextBox.Clear();
            LastNameTextBox.SendKeys(Drivers.ExcelLib.ReadData(2, "Update LastName"));

            //Select gender from dropdown
            SelectGender();

            //Enter age into the age field
            AgeTextBox.Clear();
            AgeTextBox.SendKeys(Drivers.ExcelLib.ReadData(2, "Age"));

            //Enter Address detail into the address field
            AddressTextBox.Clear();
            AddressTextBox.SendKeys(Drivers.ExcelLib.ReadData(2, "Address"));

            //Enter Phone number into the phone field
            PhonetextBox.Clear();
            PhonetextBox.SendKeys(Drivers.ExcelLib.ReadData(2, "Phone"));

            //Select hobby from the dropdown
            SelectHobby();
        }
Exemple #3
0
        // Add Comment and Click Vote
        public void AddCommentAndVote()
        {
            WaitHelpers.WaitClickableElement(Drivers.driver, "XPath", "//*[contains(@id,'comment')]");

            // Check if  AddComment text box is present and then enter comment
            Assert.AreEqual(AddComment.Displayed, true);

            AddComment.SendKeys(Drivers.ExcelLib.ReadData(2, "Comment"));
            VoteButton.Click();
        }
Exemple #4
0
        // Overall rating method
        public void OverallModel()
        {
            // Wait untill the page is loaded
            WaitHelpers.WaitClickableElement(Drivers.driver, "XPath", "//a[contains(text(),'»')]");

            // Actions method to move between pages
            Actions act = new Actions(Drivers.driver);

            act.MoveToElement(Drivers.driver.FindElement(By.XPath("//a[contains(text(),'»')]"))).Click().Build().Perform();
            WaitHelpers.TurnOnWait();

            // Click overall model
            OverallModel1.Click();

            // Wait and Click on the car to vote
            WaitHelpers.WaitClickableElement(Drivers.driver, "XPath", "//a[contains(text(),'Delta')]");
            OverallModel2.Click();
        }
        // Update Password
        public void ChangePassword()
        {
            // Wait untill the profile button is found
            WaitHelpers.WaitClickableElement(Drivers.driver, "XPath", "//a[contains(text(),'Profile')]");

            // Click Profile buttton
            ProfileButton.Click();

            WaitHelpers.TurnOnWait();

            // Entering current password
            CurrentPassword.SendKeys(Drivers.ExcelLib.ReadData(2, "Password"));

            // Entering New password
            NewPassword.SendKeys(Drivers.ExcelLib.ReadData(2, "New Password"));

            // Entering Confirm password
            ConfirmPassword.SendKeys(Drivers.ExcelLib.ReadData(2, "New Password"));
        }
 // Logout Assertion
 public void LogOutAssertion()
 {
     // Wait untill the login button
     WaitHelpers.WaitClickableElement(Drivers.driver, "XPath", "//button[@class='btn btn-success']");
     Assert.AreEqual(LoginButton.Displayed, true);
 }
        internal void GoToManageListing()
        {
            WaitHelpers.WaitClickableElement(driver, "CssSelector", "a[href='/Home/ListingManagement']");

            ManageListing.Click();
        }
        public void GoToShareSkill()
        {
            WaitHelpers.WaitClickableElement(driver, "XPath", "//a[@class='ui basic green button']");

            ShareSkillButton.Click();
        }