Пример #1
0
        public void DeleteEmailVerifyTrashFolder(string username, string password)
        {
            Login(username, password);
            List <IWebElement> emails = driver.FindElements(By.CssSelector("div[class = 'ae4 aDM']> div>div>table>tbody>tr")).ToList();

            emails[1].Click();
            var subj = Subj.Text.ToString();

            MoreLink.Click();
            DeleteIcon.Click();
            TrashFolder.Click();
            List <IWebElement> emailsTrash = driver.FindElements(By.CssSelector("div[class = 'ae4 UI']> div>div>table>tbody>tr")).ToList();

            foreach (IWebElement email in emailsTrash)
            {
                if (email.Text.Contains(subj) == true)
                {
                    email.Click();
                    break;
                }
                else
                {
                    driver.Close();
                }
            }
        }
Пример #2
0
        public void DeleteData()
        {
            Thread.Sleep(7000);
            ManageListing.Click();

            Thread.Sleep(7000);
            DeleteIcon.Click();

            ConfirmYes.Click();
        }
Пример #3
0
        public void DeleteItem()
        {
            // AC 1.1 - Delete Icon
            Boolean ImagePresent = DeleteIcon.Displayed;

            Assert.IsTrue(ImagePresent, "No Image exist");
            Console.WriteLine(DeleteIcon.Text + " Delete Button exist");

            //AC 1.2 Item removed from cart
            DeleteIcon.Click();

            BasePage.driver.Navigate().Refresh();

            //Shopping cart summary (title)
            Assert.AreEqual(CartTitle.Text, "SHOPPING-CART SUMMARY");
            Console.WriteLine(CartTitle.Text + " title is displayed");

            // AC 1.3  Warning banner displayed
            Assert.AreEqual(WarningBanner.Text, "Your shopping cart is empty.");
            Console.WriteLine(WarningBanner.Text + " banner is displayed");
        }
Пример #4
0
        public void DeleteData()
        {
            Thread.Sleep(7000);
            ManageListing.Click();

            Thread.Sleep(7000);
            DeleteIcon.Click();

            ConfirmYes.Click();
            Thread.Sleep(4000);

            //Verfication
            try
            {
                Assert.IsTrue(ActResult3.Displayed);
                Console.WriteLine("Test 3 Pass : Record deleted successfully");

                Base.test.Log(LogStatus.Info, "Deleting Done");
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #5
0
        internal void DeleteListingSkills()
        {
            //Click on Manage LIsting tab
            MgmtListTab.Click();

            Thread.Sleep(1000);

            // Delete skills form managelisting page
            DeleteIcon.Click();

            try
            {
                //Check the popup  "Delete your service" is present or not
                if (PopUp != null)
                {
                    //If yes button found,then click on it and Navigate to Managelisting page
                    YesBtn.Click();
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Yes button found on popup ");
                    string screenshotpath = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Yes button found on popup");
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Snapshot below:" + Base.test.AddBase64ScreenCapture(screenshotpath));
                }

                else
                {
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Yes button is not found on popup ");
                    string screenshotpath = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Yes button found on popup");
                    Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Snapshot below:" + Base.test.AddBase64ScreenCapture(screenshotpath));
                }
            }
            catch (Exception e)
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Yes button is not present in Delete service popup " + e.Message);
                string screenshotpath = SaveScreenShotClass.SaveScreenshot(GlobalDefinitions.driver, "Yes button is not present in Delete service popup");
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Snapshot below:" + Base.test.AddBase64ScreenCapture(screenshotpath));
            }
        }