Exemple #1
0
        public void Description(IWebDriver driver)
        {
            Excellibhelper.PopulateInCollection("C:\\Users\\nikhi\\Desktop\\Desktop\\VS Projects\\ProjectMARS\\TestData\\ExcelData.xlsx", "profile");
            //enter the description
            IWebElement des = driver.FindElement(By.XPath("//i[@class='outline write icon']"));

            des.Click();
            Thread.Sleep(500);

            IWebElement details = driver.FindElement(By.XPath("//textarea[@placeholder='Please tell us about any hobbies, additional expertise, or anything else you’d like to add.']"));

            details.SendKeys(Excellibhelper.ReadData(2, "description"));
            Thread.Sleep(500);


            IWebElement Save = driver.FindElement(By.XPath("//button[@type='button']"));

            Save.Click();
            Thread.Sleep(500);

            //check if the description is displayed

            if (driver.FindElement(By.XPath("//span[normalize-space()='I am very artistic and like to paint.']")).Text == "I am very artistic and like to paint.")

            {
                Assert.Pass("Description is displayed,test passed");
            }

            else
            {
                Assert.Fail("Description is not displayed,test failed");
            }
        }
Exemple #2
0
        public void CreateAccount(IWebDriver driver)
        {
            //Launch up the portal
            driver.Navigate().GoToUrl("http://*****:*****@placeholder='First name']"));

            fname.SendKeys(Excellibhelper.ReadData(2, "firstname"));
            Thread.Sleep(500);

            IWebElement lname = driver.FindElement(By.XPath("//input[@placeholder='Last name']"));

            lname.SendKeys(Excellibhelper.ReadData(2, "lastname"));
            Thread.Sleep(500);

            Excellibhelper.PopulateInCollection("C:\\Users\\nikhi\\Desktop\\Desktop\\VS Projects\\ProjectMARS\\TestData\\Excel (2).xlsx", "login");
            IWebElement email = driver.FindElement(By.XPath("//input[@placeholder='Email address']"));

            email.SendKeys(Excellibhelper.ReadData(2, "username"));
            Thread.Sleep(500);

            IWebElement psword = driver.FindElement(By.XPath("//input[@placeholder='Password']"));

            psword.SendKeys(Excellibhelper.ReadData(2, "password"));
            Thread.Sleep(500);

            IWebElement confirmpsword = driver.FindElement(By.XPath("//input[@placeholder='Confirm Password']"));

            confirmpsword.SendKeys(Excellibhelper.ReadData(2, "password"));
            Thread.Sleep(500);

            //click on checkbox
            Wait.WaitForWebElementClickable(driver, "Xpath", "//input[@name='terms']");
            IWebElement checkbox = driver.FindElement(By.XPath("//input[@name='terms']"));

            checkbox.Click();
            //click on join
            IWebElement join = driver.FindElement(By.XPath("//div[@id='submit-btn']"));

            join.Click();
            Thread.Sleep(500);
        }
Exemple #3
0
        public void Education(IWebDriver driver)
        {
            Excellibhelper.PopulateInCollection("C:\\Users\\nikhi\\Desktop\\Desktop\\VS Projects\\ProjectMARS\\TestData\\ExcelData.xlsx", "education");
            //click on Education button
            IWebElement edu = driver.FindElement(By.XPath("//a[normalize-space()='Education']"));

            edu.Click();
            Thread.Sleep(500);

            //add the new education details
            IWebElement addedu = driver.FindElement(By.XPath("//div[@class='ui bottom attached tab segment tooltip-target active']//div[contains(@class,'ui teal button')][normalize-space()='Add New']"));

            addedu.Click();
            Thread.Sleep(500);

            IWebElement college = driver.FindElement(By.XPath("//input[@placeholder='College/University Name']"));

            college.SendKeys(Excellibhelper.ReadData(2, "University"));
            Thread.Sleep(500);

            IWebElement country = driver.FindElement(By.XPath("//option[@value='India']"));

            country.Click();
            Thread.Sleep(500);


            IWebElement title = driver.FindElement(By.XPath("//option[@value='B.Tech']"));

            title.Click();
            Thread.Sleep(500);

            IWebElement degree = driver.FindElement(By.XPath("//input[@placeholder='Degree']"));

            degree.SendKeys(Excellibhelper.ReadData(2, "Degree"));
            Thread.Sleep(500);

            IWebElement year = driver.FindElement(By.XPath("  //option[@value='2016']"));

            year.SendKeys(Excellibhelper.ReadData(2, "Graduation Year"));
            Thread.Sleep(500);

            IWebElement addingedu = driver.FindElement(By.XPath("//input[@value='Add']"));

            addingedu.Click();
            Thread.Sleep(500);

            IWebElement canceledu = driver.FindElement(By.XPath("//input[@value='Cancel']"));

            canceledu.Click();
            Thread.Sleep(500);
        }
        public void Skills(IWebDriver driver)
        {
            Excellibhelper.PopulateInCollection("C:\\Users\\nikhi\\Desktop\\Desktop\\VS Projects\\ProjectMARS\\TestData\\ExcelData.xlsx", "skills");
            //click on skill button
            IWebElement skill = driver.FindElement(By.XPath("//a[normalize-space()='Skills']"));

            skill.Click();
            Thread.Sleep(500);
            //enter the skills
            IWebElement addskill = driver.FindElement(By.XPath("//input[@placeholder='Add Skill']]"));

            addskill.SendKeys(Excellibhelper.ReadData(2, "skill"));
            Thread.Sleep(500);
            //select the skill level
            IWebElement skilllevel = driver.FindElement(By.XPath("//option[@value='Intermediate']"));

            skilllevel.Click();
            Thread.Sleep(500);
            IWebElement clickadd = driver.FindElement(By.XPath("//span[@class='buttons-wrapper']//input[@value='Add']"));

            clickadd.Click();
            Thread.Sleep(500);

            IWebElement cancelskill = driver.FindElement(By.XPath("//span[@class='buttons-wrapper']//input[@value='Cancel']"));

            cancelskill.Click();
            Thread.Sleep(500);

            //check if the Skill is displayed

            if (driver.FindElement(By.XPath("//input[@placeholder='Add Skill']]")).Text == "Painting")

            {
                Assert.Pass("Skill is displayed,test passed");
            }

            else
            {
                Assert.Fail("Skill is not displayed,test failed");
            }
        }
Exemple #5
0
        public void Login(IWebDriver driver)
        {
            //Launch up the portal
            driver.Navigate().GoToUrl("http://*****:*****@placeholder='Email address']"));

            Username.SendKeys(Excellibhelper.ReadData(2, "username"));
            Thread.Sleep(500);

            //Enter Password

            IWebElement Password = driver.FindElement(By.XPath("//input[@placeholder='Password']"));

            Username.SendKeys(Excellibhelper.ReadData(2, "password"));
            Thread.Sleep(500);

            //Click on login button
            IWebElement Loginbutton = driver.FindElement(By.XPath("//button[normalize-space()='Login']"));

            Loginbutton.Click();
            Thread.Sleep(1000);
        }
        public void Languages(IWebDriver driver)
        {
            Excellibhelper.PopulateInCollection("C:\\Users\\nikhi\\Desktop\\Desktop\\VS Projects\\ProjectMARS\\TestData\\ExcelData.xlsx", "language");
            //enter the languages
            IWebElement lang = driver.FindElement(By.XPath("//a[normalize-space()='Languages']"));

            lang.Click();
            Thread.Sleep(500);

            IWebElement addnew = driver.FindElement(By.XPath("//input[@placeholder='Add Language']"));

            addnew.SendKeys(Excellibhelper.ReadData(2, "languages"));
            Thread.Sleep(500);

            IWebElement langlevel = driver.FindElement(By.XPath("//option[@value='Fluent']"));

            langlevel.Click();
            Thread.Sleep(500);

            IWebElement addlang = driver.FindElement(By.XPath("//input[@class='ui teal button']"));

            addlang.Click();

            IWebElement cancellang = driver.FindElement(By.XPath("//div[@class='six wide field']//input[@value='Cancel']"));

            cancellang.Click();
            Thread.Sleep(500);
            //check if the language is displayed

            if (driver.FindElement(By.XPath("//input[@placeholder='Add Language']")).Text == "Hindi")

            {
                Assert.Pass("Language is displayed,test passed");
            }

            else
            {
                Assert.Fail("Language is not displayed,test failed");
            }
        }
Exemple #7
0
        public void ProfileName(IWebDriver driver)
        {
            Excellibhelper.PopulateInCollection("C:\\Users\\nikhi\\Desktop\\Desktop\\VS Projects\\ProjectMARS\\TestData\\ExcelData.xlsx", "profile");

            //enter the name
            IWebElement name = driver.FindElement(By.XPath("//div[@class='title']//i[@class='dropdown icon']"));

            name.Click();
            Thread.Sleep(500);
            IWebElement fname = driver.FindElement(By.XPath("//input[@name='firstName']"));

            fname.SendKeys(Excellibhelper.ReadData(2, "firstname"));
            Thread.Sleep(500);

            IWebElement lname = driver.FindElement(By.XPath("//input[@name='lastName']"));

            lname.SendKeys(Excellibhelper.ReadData(2, "lastname"));
            Thread.Sleep(500);
            //save the name
            IWebElement savename = driver.FindElement(By.XPath("//button[normalize-space()='Save']"));

            savename.Click();
            Thread.Sleep(500);

            //To check if the Profile name is displayed

            if (driver.FindElement(By.XPath("//div[@class='ui fluid accordion']//div[@class='content']")).Text == "Nikhita NJ")

            {
                Assert.Pass("Name is displayed,test passed");
            }

            else
            {
                Assert.Fail("Name is not displayed,test failed");
            }
        }