//Adding New Language
        public void addNewLanguage()
        {
            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "AddLanguage");

            //Enter value in Add Language field
            //IWebElement addLanguageName = Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[contains(@class,'active') and contains(@class, 'tab')]/div/div[2]/div/div/div[1]/input"));
            addLanguageName.Clear();
            addLanguageName.Click();
            addLanguageName.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Language"));

            //Select value for level
            //IWebElement DropDownList = Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[contains(@class,'active') and contains(@class, 'tab')]/div/div[2]/div/div/div[2]//select"));
            IList <IWebElement> options = DropDownList.FindElements(By.TagName("option"));
            int optionCount             = options.Count();

            for (int i = 0; i < optionCount; i++)
            {
                if (options[i].Text == GlobalDefinitions.ExcelOperations.ReadData(1, "LanguageLevel"))
                {
                    options[i].Click();
                }
            }

            //Click Add Button after enter lanaguage and language level
            //IWebElement clickAdd = Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='six wide field']/input[1]"));
            clickAdd.Click();
            Thread.Sleep(5000);
        }
        //Adding New SKill
        public void addNewSkill()
        {
            //Excel sheet data for Add skill
            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "AddSkill");


            //Enter value in Add skill field
            //IWebElement addSkill = GlobalDefinitions.driver.FindElement(By.XPath("//*[contains(@class,'active') and contains(@class, 'tab')]/div/div[2]/div/div/div[1]/input"));
            addSkill.Clear();
            addSkill.Click();
            addSkill.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Skill"));

            //Select value for level
            IWebElement         DropDownList = GlobalDefinitions.driver.FindElement(By.XPath("//*[contains(@class,'active') and contains(@class, 'tab')]/div/div[2]/div/div/div[2]//select"));
            IList <IWebElement> options      = DropDownList.FindElements(By.TagName("option"));
            int optionCount = options.Count();

            for (int i = 0; i < optionCount; i++)
            {
                if (options[i].Text == GlobalDefinitions.ExcelOperations.ReadData(1, "SkillLevel"))
                {
                    options[i].Click();
                }
            }

            //Click Add Button after enter skill and skill level
            //IWebElement clickAdd = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='buttons-wrapper']/input[1]"));
            clickAdd.Click();
            Thread.Sleep(5000);
        }
        internal void ListingVerification()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "ShareSkill");

            GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("/html[1]/body[1]/div[1]/div[1]/div[1]/div[2]/div[1]/table[1]/tbody[1]/tr[1]/td[3]"), 5);

            IWebElement Title = GlobalDefinitions.driver.FindElement(By.XPath("/html[1]/body[1]/div[1]/div[1]/div[1]/div[2]/div[1]/table[1]/tbody[1]/tr[1]/td[3]"));

            Assert.AreEqual(Title.Text, GlobalDefinitions.ExcelOperations.ReadData(2, "Title"));
        }
예제 #4
0
        public void LoginSteps()
        {
            GlobalDefinitions.driver.Manage().Window.Maximize();

            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "SignIn"); //Populating second sheet of excel sheet

            GlobalDefinitions.driver.Navigate().GoToUrl(GlobalDefinitions.ExcelOperations.ReadData(1, "Url"));

            //Click on Sign In tab
            SignIntab.Click();
            Thread.Sleep(500);

            //Enter the data in Username textbox
            Email.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Email"));
            Thread.Sleep(500);

            //Enter the password
            Password.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Password"));
            Thread.Sleep(500);

            //Click on Login button
            LoginBtn.Click();
            Thread.Sleep(7000);

            //Verification
            Thread.Sleep(1000);

            //Verification
            var text = Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='item']/button"));

            Assert.IsTrue(text.Text.Contains("Sign Out"));


            //string msg = GlobalDefinitions.ExcelOperations.ReadData(1, "DATA");
            //string Actualmsg = Test.Text;
            //Thread.Sleep(500);
            //if (msg == Actualmsg)
            //{
            //    Console.WriteLine("Login into application");
            //}

            //else
            //    Console.WriteLine("Login Fail");
        }
예제 #5
0
        public void addNewCertification()
        {
            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "AddCertification");



            //Enter value in Add Certificate field
            //IWebElement addCertificate = GlobalDefinitions.driver.FindElement(By.Name("certificationName"));

            addCertificate.Clear();
            addCertificate.Click();
            addCertificate.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Certificate"));

            //Add Certifiacte From
            //IWebElement addCertificateFrom = GlobalDefinitions.driver.FindElement(By.Name("certificationFrom"));

            addCertificateFrom.Clear();
            addCertificateFrom.Click();
            addCertificateFrom.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "From"));

            //Select value for year
            //IWebElement DropDownList = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='ui fluid dropdown']"));

            IList <IWebElement> options = DropDownList.FindElements(By.TagName("option"));
            int optionCount             = options.Count();

            for (int i = 0; i < optionCount; i++)
            {
                if (options[i].Text == GlobalDefinitions.ExcelOperations.ReadData(1, "Year"))
                {
                    options[i].Click();
                    break;
                }
            }

            //Click Add Button after enter Education deatils
            //IWebElement clickAdd = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='five wide field']/input[1]"));

            clickAdd.Click();
            Thread.Sleep(5000);
        }
        public void LoginSteps()
        {
            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "SignIn"); //Populating second sheet of excel sheet

            string pathurl = GlobalDefinitions.ExcelOperations.ReadData(1, "Url");

            GlobalDefinitions.driver.Navigate().GoToUrl(pathurl);

            GlobalDefinitions.driver.Manage().Window.Maximize();

            //Click on Sign In tab
            SignIntab.Click();
            Thread.Sleep(500);

            //Enter the data in Username textbox
            Email.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Username"));
            Thread.Sleep(500);

            //Enter the password
            Password.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Password"));
            Thread.Sleep(500);

            //Click on Login button
            LoginBtn.Click();
            Thread.Sleep(3000);

            ////Verification
            //Thread.Sleep(1000);
            //string msg = GlobalDefinitions.ExcelOperations.ReadData(1, "DATA");
            //string Actualmsg = Test.Text;
            //Thread.Sleep(500);
            //if (msg == Actualmsg)
            //{
            //    Console.WriteLine("Login into application");
            //}

            //else
            //    Console.WriteLine("Login Fail");
        }
예제 #7
0
        public void Register()
        {
            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "SignUp");
            //GlobalDefinitions.driver.Navigate().GoToUrl(GlobalDefinitions.ExcelOperations.ReadData(1,"url"));
            GlobalDefinitions.driver.Navigate().GoToUrl("http://www.skillswap.pro/");
            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);
        }
        //Adding New Education
        public void addNewEducation()
        {
            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "AddEducation");


            //Enter value in College/University name field
            //IWebElement addCollege = GlobalDefinitions.driver.FindElement(By.XPath("//*[contains(@class,'active') and contains(@class, 'tab')]/div/div[2]/div/div/div[1]/div[1]/input"));
            addCollege.Clear();
            addCollege.Click();
            addCollege.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "InstituteName"));

            //Select value for Country
            //IWebElement DropDownListCountry = GlobalDefinitions.driver.FindElement(By.XPath("//*[contains(@class,'active') and contains(@class, 'tab')]/div/div[2]/div/div/div[1]/div[2]/select"));
            IList <IWebElement> optionsCountry = DropDownListCountry.FindElements(By.TagName("option"));
            int optionCountCountry             = optionsCountry.Count();

            for (int i = 0; i < optionCountCountry; i++)
            {
                if (optionsCountry[i].Text == GlobalDefinitions.ExcelOperations.ReadData(1, "Country"))
                {
                    optionsCountry[i].Click();
                    break;
                }
            }

            //Select value for Title
            //IWebElement DropDownListTitle = GlobalDefinitions.driver.FindElement(By.XPath("//*[contains(@class,'active') and contains(@class, 'tab')]/div/div[2]/div/div/div[2]/div[1]/select"));
            IList <IWebElement> optionsTitle = DropDownListTitle.FindElements(By.TagName("option"));
            int optionCountTitle             = optionsTitle.Count();

            for (int i = 0; i < optionCountTitle; i++)
            {
                if (optionsTitle[i].Text == GlobalDefinitions.ExcelOperations.ReadData(1, "Title"))
                {
                    optionsTitle[i].Click();
                    break;
                }
            }

            //Enter value in Degree field
            //IWebElement addDegree = GlobalDefinitions.driver.FindElement(By.XPath("//*[contains(@class,'active') and contains(@class, 'tab')]/div/div[2]/div/div/div[2]/div[2]/input"));
            addDegree.Clear();
            addDegree.Click();
            addDegree.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Degree"));

            //Select value for Year
            //IWebElement DropDownListYear = GlobalDefinitions.driver.FindElement(By.XPath("//*[contains(@class,'active') and contains(@class, 'tab')]/div/div[2]/div/div/div[2]/div[3]/select"));
            IList <IWebElement> optionsYear = DropDownListYear.FindElements(By.TagName("option"));
            int optionCountYear             = optionsYear.Count();

            for (int i = 0; i < optionCountYear; i++)
            {
                if (optionsYear[i].Text == GlobalDefinitions.ExcelOperations.ReadData(1, "Year"))
                {
                    optionsYear[i].Click();
                    break;
                }
            }

            //Click Add Button after enter Education deatils
            //IWebElement clickAdd = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='sixteen wide field']/input[1]"));
            clickAdd.Click();
            Thread.Sleep(5000);
        }
예제 #9
0
        internal void EditProfile()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "Profile");
            //GlobalDefinitions.wait(5);

            //click on Profile from menu

            //clickProfile.Click();

            //Click on user name
            clickUserName.Click();

            //Edit First Name
            //GlobalDefinitions.wait(5);
            GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='field']/input[1]")).Click();
            GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='field']/input[1]")).Clear();
            GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='field']/input[1]")).SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "FirstName"));

            //Edit Last Name
            lastName.Click();
            lastName.Clear();
            lastName.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "LastName"));

            //click Save button
            clickSave.Click();
            Thread.Sleep(5000);

            //Click Availiable  Edit Icon

            availabilityTimeEditIcon.Click();
            Thread.Sleep(5000);
            //GlobalDefinitions.wait(5);

            //Availability Time option

            switch (GlobalDefinitions.ExcelOperations.ReadData(1, "AvailableTime"))
            {
            case "Full Time":
                // IWebElement fullTime = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='extra content']/div/div[2]/div/span/select/option[3]"));
                fullTime.Click();
                break;

            case "Part Time":
                //IWebElement partTime = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='extra content']/div/div[2]/div/span/select/option[2]"));
                partTime.Click();
                break;
            }
            // Hours Edit Icon

            hoursEditIcon.Click();
            //GlobalDefinitions.wait(5);

            //Availability Hours option

            switch (GlobalDefinitions.ExcelOperations.ReadData(1, "Hours"))
            {
            case "Less than 30hours a week":
                //IWebElement lessHours = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='extra content']/div/div[3]/div/span/select/option[2]"));
                lessHours.Click();
                break;

            case "More than 30hours a week":
                //IWebElement moreHours = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='extra content']/div/div[3]/div/span/select/option[3]"));
                moreHours.Click();
                break;

            case "As needed":
                //IWebElement asNeeded = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='extra content']/div/div[3]/div/span/select/option[4]"));
                asNeeded.Click();
                break;
            }

            //Click edit for earn Target

            earnTargetEditIcon.Click();
            Thread.Sleep(5000);

            //Earn Target option

            switch (GlobalDefinitions.ExcelOperations.ReadData(1, "EarnTarget"))
            {
            case "Less than $500 per month":
                //IWebElement lessEarn = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='extra content']/div/div[4]/div/span/select/option[2]"));
                lessEarn.Click();
                break;

            case "Between $500 and $1000 per month":
                //IWebElement moreEarn = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='extra content']/div/div[4]/div/span/select/option[3]"));
                moreEarn.Click();
                break;

            case "More than $1000 per month":
                //IWebElement doubleEarn = GlobalDefinitions.driver.FindElement(By.XPath("//*[@class='extra content']/div/div[4]/div/span/select/option[4]"));
                doubleEarn.Click();
                break;
            }

            //Add or edit the descritpion
            editDescription.Click();
            textDescription.Clear();
            textDescription.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Description"));
            descritpionSave.Click();
        }
        ////Days selection
        //private IWebElement Days = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[2]//div[1]//div[1]//input[1]"));

        ////time selection
        //private IWebElement time = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[2]//div[2]//input[1]"));

        ////Title validation message
        //private IWebElement TitleValidation = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='ui basic red prompt label transition visible']"));

        ////Description validation message for invalid
        //private IWebElement DescriptionValidation = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='ui basic red prompt label transition visible']"));

        ////Description validation for null
        //private IWebElement DescriptionValidationNull = GlobalDefinitions.driver.FindElement(By.XPath("//div[contains(text(),'Description is required')]"));

        ////Category validation message
        //private IWebElement CategoryValidation = GlobalDefinitions.driver.FindElement(By.XPath("//div[contains(text(),'Category is required')]"));

        ////subcategory validation message
        //private IWebElement SubcategoryValidation = GlobalDefinitions.driver.FindElement(By.XPath("/html[1]/body[1]/div[1]/div[1]/div[1]/div[2]/div[1]/form[1]/div[3]/div[2]/div[1]/div[2]/div[2]/div[1]"));

        ////start date validation message
        //private IWebElement StartDateValidation = GlobalDefinitions.driver.FindElement(By.XPath("//div[contains(text(),'Start Date cannot be set to a day in the past')]"));

        //// Tag validation message
        //private IWebElement TagValidation = GlobalDefinitions.driver.FindElement(By.XPath("//div[contains(text(),'Tags are required')]"));

        ////skill exchange validation
        //private IWebElement ExchangeValidation = GlobalDefinitions.driver.FindElement(By.XPath("/html[1]/body[1]/div[1]/div[1]/div[1]/div[2]/div[1]/form[1]/div[8]/div[4]/div[2]"));



        #region Adding service with valid values
        internal bool ShareSkill()
        {
            try
            {
                //Populate From Excel
                GlobalDefinitions.ExcelOperations.PopulateInCollection(GlobalDefinitions.ReadJson(), "ShareSkill");

                Thread.Sleep(2000);

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

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

                Thread.Sleep(2000);
                //Select Category
                SelectElement Categories = new SelectElement(Category);
                Categories.SelectByText(GlobalDefinitions.ExcelOperations.ReadData(1, "Category"));

                //select Sub category
                IWebElement Subcategory = GlobalDefinitions.driver.FindElement(By.XPath("//select[@name='subcategoryId']"));

                SelectElement SubCategories = new SelectElement(Subcategory);
                SubCategories.SelectByText(GlobalDefinitions.ExcelOperations.ReadData(1, "Subcategory"));

                Thread.Sleep(2000);
                //Enter Tags
                TagInner.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Tags"));
                TagInner.SendKeys(Keys.Enter);

                //Service type
                string ServiceToSelect = GlobalDefinitions.ExcelOperations.ReadData(1, "ServiceType");
                if (ServiceToSelect == "One-off service")
                {
                    ServiceOne.Click();
                }
                else if (ServiceToSelect == "Hourly basis service")
                {
                    ServiceHourly.Click();
                }

                //select Location type
                string Locationtype = GlobalDefinitions.ExcelOperations.ReadData(1, "LocationType");
                if (Locationtype == "On-site")
                {
                    LocationOnsite.Click();
                }
                else if (Locationtype == "Online")
                {
                    LocationOnline.Click();
                }
                Thread.Sleep(2000);
                string   SDate     = GlobalDefinitions.ExcelOperations.ReadData(1, "StartDate");
                string[] SDateForm = SDate.Split(' ');

                StartDate.SendKeys(SDateForm[0]);

                string   EDate     = GlobalDefinitions.ExcelOperations.ReadData(1, "EndDate");
                string[] EDateForm = EDate.Split(' ');

                EndDate.SendKeys(EDateForm[0]);

                Thread.Sleep(2000);
                string days           = GlobalDefinitions.ExcelOperations.ReadData(1, "AvailableDays");
                string DaysToLwercase = days.ToLower();

                string[] Dayslist = DaysToLwercase.Split(',');
                int      count    = Dayslist.Count();

                string   StartTimevalue = GlobalDefinitions.ExcelOperations.ReadData(1, "StartTime");
                string[] Starttimelist  = StartTimevalue.Split(',');


                string   EndTimeValue = GlobalDefinitions.ExcelOperations.ReadData(1, "EndTime");
                string[] EndTimelist  = EndTimeValue.Split(',');


                for (int i = 0; i <= count - 1; i++)
                {
                    if (Dayslist[i].ToLower() == "sunday")
                    {
                        GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[2]//div[1]//div[1]//input[1]")).Click();
                        IWebElement StartTime = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[2]//div[2]//input[1]"));
                        IWebElement EndTime   = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[2]//div[3]//input[1]"));
                        StartTime.SendKeys(Starttimelist[i]);
                        EndTime.SendKeys(EndTimelist[i]);
                    }
                    else if (Dayslist[i].ToLower() == "monday")
                    {
                        GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[3]//div[1]//div[1]//input[1]")).Click();
                        IWebElement StartTime = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[3]//div[2]//input[1]"));
                        IWebElement EndTime   = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[3]//div[3]//input[1]"));
                        StartTime.SendKeys(Starttimelist[i]);
                        EndTime.SendKeys(EndTimelist[i]);
                    }
                    else if (Dayslist[i].ToLower() == "tuesday")
                    {
                        GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[4]//div[1]//div[1]//input[1]")).Click();
                        IWebElement StartTime = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[4]//div[2]//input[1]"));
                        IWebElement EndTime   = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[4]//div[3]//input[1]"));
                        StartTime.SendKeys(Starttimelist[i]);
                        EndTime.SendKeys(EndTimelist[i]);
                    }

                    else if (Dayslist[i].ToLower() == "wednesday")
                    {
                        GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[5]//div[1]//div[1]//input[1]")).Click();
                        IWebElement StartTime = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[5]//div[2]//input[1]"));
                        IWebElement EndTime   = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[5]//div[3]//input[1]"));
                        StartTime.SendKeys(Starttimelist[i]);
                        EndTime.SendKeys(EndTimelist[i]);
                    }

                    else if (Dayslist[i].ToLower() == "thursday")
                    {
                        GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[6]//div[1]//div[1]//input[1]")).Click();
                        IWebElement StartTime = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[6]//div[2]//input[1]"));
                        IWebElement EndTime   = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[6]//div[3]//input[1]"));
                        StartTime.SendKeys(Starttimelist[i]);
                        EndTime.SendKeys(EndTimelist[i]);
                    }
                    else if (Dayslist[i].ToLower() == "friday")
                    {
                        GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[7]//div[1]//div[1]//input[1]")).Click();
                        IWebElement StartTime = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[7]//div[2]//input[1]"));
                        IWebElement EndTime   = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[7]//div[3]//input[1]"));
                        StartTime.SendKeys(Starttimelist[i]);
                        EndTime.SendKeys(EndTimelist[i]);
                    }

                    else if (Dayslist[i].ToLower() == "saturday")
                    {
                        GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[8]//div[1]//div[1]//input[1]")).Click();
                        IWebElement StartTime = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[8]//div[2]//input[1]"));
                        IWebElement EndTime   = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//div[8]//div[3]//input[1]"));
                        StartTime.SendKeys(Starttimelist[i]);
                        EndTime.SendKeys(EndTimelist[i]);
                    }
                }


                //select Skill trade
                string SkillTrade = GlobalDefinitions.ExcelOperations.ReadData(1, "SkillTrade");
                if (SkillTrade == "Credit")
                {
                    Skillcredit.Click();
                    //credit
                    IWebElement Credit = GlobalDefinitions.driver.FindElement(By.XPath("//input[@placeholder='Amount']"));
                    //Add credit
                    Credit.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "Credit"));
                }
                else if (SkillTrade == "Skill-exchange")
                {
                    SkillExcha.Click();
                    //Skill Exchange - Add new tag
                    IWebElement SkillExchange = GlobalDefinitions.driver.FindElement(By.XPath("//div[@class='form-wrapper']//input[@placeholder='Add new tag']"));
                    //Add Skill Exchange
                    SkillExchange.SendKeys(GlobalDefinitions.ExcelOperations.ReadData(1, "SkillExchange"));
                    SkillExchange.SendKeys(Keys.Enter);
                }

                //Samples.Click();
                //Thread.Sleep(2000);
                //AutoItX3 file = new AutoItX3();
                //file.WinActivate("Open");
                //file.Send(GlobalDefinitions.ExcelOperations.ReadData(1, "WorkSamples"));
                //Thread.Sleep(1000);
                //file.Send("{ENTER}");

                Thread.Sleep(2000);

                Save.Click();

                Thread.Sleep(2000);
                return(true);
            }

            catch (Exception e)
            {
                Console.WriteLine("Exception occured in " + e.Message);
                return(false);
            }
        }