Exemplo n.º 1
0
        public static ProductInfoPage OpenProduct(Products products, IWebDriver driver)
        {
            MainPage        mainPage        = new MainPage(driver);
            AllProductsPage allProductsPage = mainPage.OpenProducts();

            return(allProductsPage.OpenProduct(products));
        }
Exemplo n.º 2
0
 public void CheckProduct()
 {
     productPage = allProductsPage.OpenProduct("Spagetti");
     Assert.AreEqual(productPage.ReadProductName(), "Spagetti");
     Assert.AreEqual(productPage.ReadCategoryId(), "Dairy Products");
     Assert.AreEqual(productPage.ReadSupplierId(), "Heli Süßwaren GmbH & Co. KG");
     Assert.AreEqual(productPage.ReadUnitPrice(), "17,0000");
     Assert.AreEqual(productPage.ReadQuantityPerUnit(), "3");
     Assert.AreEqual(productPage.ReadUnitsInStock(), "500");
     Assert.AreEqual(productPage.ReadUnitsOnOrder(), "6");
     Assert.AreEqual(productPage.ReadReorderLevel(), "9");
     productPage.ToAllProducts();
 }
Exemplo n.º 3
0
        public Product ReadProduct(Product product, IWebDriver driver)
        {
            productPage = allProductsPage.OpenProduct(product.productName);

            Product product2 = new Product
            {
                productName     = productPage.ReadProductName(),
                categoryId      = productPage.ReadCategoryId(),
                supplierId      = productPage.ReadSupplierId(),
                unitPrice       = (Convert.ToDouble(productPage.ReadUnitPrice())).ToString(),
                quantityPerUnit = productPage.ReadQuantityPerUnit(),
                unitsInStock    = productPage.ReadUnitsInStock(),
                unitsOnOrder    = productPage.ReadUnitsOnOrder(),
                reorderLevel    = productPage.ReadReorderLevel()
            };

            return(product2);
        }