Пример #1
0
        public void ManageListingsDeleteDetails()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ShareSkill");
            Thread.Sleep(1000);

            ManagelistingButton.Click();
            Thread.Sleep(1000);
            int  rec      = Numrecords.Count;
            bool recfound = false;

            try
            {
                for (int g = 1; g <= NumofPages.Count; g++)
                {
                    for (int j = 0; j < rec; j++)
                    {
                        Thread.Sleep(1000);

                        if (Numrecords[j].Text == (GlobalDefinitions.ExcelLib.ReadData(2, "Title")))
                        {
                            Thread.Sleep(2000);
                            DeleteEye[j].Click();
                            Thread.Sleep(2000);
                            ConfirmDelete.Click();
                            Thread.Sleep(2000);
                            recfound = true;
                            break;
                        }
                    }
                    if (recfound == false)
                    {
                        Nextpage.Click();
                        Thread.Sleep(5000);
                    }
                    else
                    {
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Could not find the record specified");
            }
        }
Пример #2
0
        public void ManageListingsServiceDetails()
        {
            //Populate the Excel Sheet
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ShareSkill");
            Thread.Sleep(1000);

            ManagelistingButton.Click();
            Thread.Sleep(1000);
            int  records     = Numrecords.Count;
            bool foundrecord = false;

            try
            {
                for (int p = 1; p <= NumofPages.Count; p++)
                {
                    for (int i = 0; i < records; i++)
                    {
                        Thread.Sleep(1000);

                        if (Numrecords[i].Text == (GlobalDefinitions.ExcelLib.ReadData(2, "Title")))
                        {
                            Thread.Sleep(2000);
                            Eye[i].Click();
                            foundrecord = true;
                            break;
                        }
                    }
                    if (foundrecord == false)
                    {
                        Nextpage.Click();
                        Thread.Sleep(5000);
                    }
                    else
                    {
                        break;
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Could not find the record specified");
            }
        }