Beispiel #1
0
 public void Add()
 {
     homePage        = new HomePage(driver);
     allProductsPage = homePage.ClickOnLink("All Products");
     productPage     = allProductsPage.CreateProduct();
     productPage.InputProductName("Spagetti");
     productPage.InputCategoryId("Dairy Products");
     productPage.InputSupplierId("Heli Süßwaren GmbH & Co. KG");
     productPage.InputUnitPrice("17");
     productPage.InputQuantityPerUnit("3");
     productPage.InputUnitsInStock("500");
     productPage.InputUnitsOnOrder("6");
     productPage.InputReorderLevel("9");
     productPage.Submit();
     Assert.AreEqual("All Products", productPage.TitleText());
     Assert.IsTrue(allProductsPage.IsProductPresent("Spagetti"));
 }
Beispiel #2
0
        public void InputProduct(Product product, IWebDriver driver)
        {
            HomePage homePage = new HomePage(driver);

            homePage        = new HomePage(driver);
            allProductsPage = homePage.ClickOnLink("All Products");
            productPage     = allProductsPage.CreateProduct();
            productPage.InputProductName(product.productName);
            productPage.InputCategoryId(product.categoryId);
            productPage.InputSupplierId(product.supplierId);
            productPage.InputUnitPrice((product.unitPrice).ToString());
            productPage.InputQuantityPerUnit(product.quantityPerUnit);
            productPage.InputUnitsInStock(product.unitsInStock);
            productPage.InputUnitsOnOrder(product.unitsOnOrder);
            productPage.InputReorderLevel(product.reorderLevel);
            productPage.Submit();
        }