public void GetHomePageVP()
 {
     try
     {
         string element = navegador.FindElement(By.PartialLinkText("Faded Short Sleeve T-shirts")).Text;
         Assert.AreEqual(element, "Faded Short Sleeve T-shirts");
         Report.Log(LogStatus.Pass, "Test Automation Practice Homepage successfully executed!", ScreenshotUtils.Capture());
     }
     catch
     {
         Report.Log(LogStatus.Error, "Page Not Found!", ScreenshotUtils.Capture());
         throw new NoSuchElementException("Page Not Found!");
     }
 }
Пример #2
0
 public void GetAddressPageVP()
 {
     try
     {
         System.Threading.Thread.Sleep(4000);
         IWebElement element = navegador.FindElement(By.Id("customer_firstname"));
         Report.Log(LogStatus.Pass, "AddressPage successfully acessed!", ScreenshotUtils.Capture());
     }
     catch
     {
         Report.Log(LogStatus.Error, "Page Not Found!", ScreenshotUtils.Capture());
         throw new NoSuchElementException("Page Not Found!");
     }
 }
 public void GetShippingPageVP()
 {
     try
     {
         System.Threading.Thread.Sleep(4000);
         IWebElement element = navegador.FindElement(By.Id("HOOK_BEFORECARRIER"));
         Report.Log(LogStatus.Pass, "ShippingPage successfully acessed!", ScreenshotUtils.Capture());
     }
     catch
     {
         Report.Log(LogStatus.Error, "Page Not Found!", ScreenshotUtils.Capture());
         throw new NoSuchElementException("Page Not Found!");
     }
 }
Пример #4
0
 public void GetSignInPageVP()
 {
     try
     {
         IWebElement element = navegador.FindElement(By.Id("authentication"));
         System.Threading.Thread.Sleep(10000);
         IJavaScriptExecutor jse = (IJavaScriptExecutor)navegador;
         jse.ExecuteScript("window.scrollBy(0,650)");
         Report.Log(LogStatus.Pass, "SignInPage successfully acessed!", ScreenshotUtils.Capture());
     }
     catch
     {
         Report.Log(LogStatus.Error, "Page Not Found!", ScreenshotUtils.Capture());
         throw new NoSuchElementException("Page Not Found!");
     }
 }
        public String GetTituloVP()
        {
            try
            {
                String titulo;
                titulo = navegador.FindElement(By.XPath("//h3[contains(text(),'More info')]")).Text;
                Assert.AreEqual(titulo, "MORE INFO");
                Report.Log(LogStatus.Pass, "DescriptionPage successfully accessed!", ScreenshotUtils.Capture());

                return(titulo);
            }
            catch
            {
                Report.Log(LogStatus.Error, "Page Not Found!", ScreenshotUtils.Capture());
                throw new NoSuchElementException("Page Not Found!");
            }
        }
Пример #6
0
        public String GetTituloVP()
        {
            try
            {
                String titulo;
                titulo = navegador.FindElement(By.LinkText("Proceed to checkout")).Text;
                Assert.AreEqual(titulo, "Proceed to checkout");
                Report.Log(LogStatus.Pass, "ConfirmationPage successfully acessed!", ScreenshotUtils.Capture());

                return(titulo);
            }
            catch
            {
                Report.Log(LogStatus.Error, "Page Not Found!", ScreenshotUtils.Capture());
                throw new NoSuchElementException("Page Not Found!");
            }
        }
Пример #7
0
        public String GetTituloVP2()
        {
            try
            {
                String titulo;
                titulo = navegador.FindElement(By.XPath("//span [text()='Faded Short Sleeve T-shirts']")).Text;
                Assert.AreEqual(titulo, "Faded Short Sleeve T-shirts");
                Report.Log(LogStatus.Pass, "Product Added!", ScreenshotUtils.Capture());

                return(titulo);
            }
            catch
            {
                Report.Log(LogStatus.Error, "Product Not Added!", ScreenshotUtils.Capture());
                throw new NoSuchElementException("Product Not Added!");
            }
        }