コード例 #1
0
 public MainPage Add(string Product, string Price, string Quantity, string Stock, string Order, string Level)
 {
     AllProducts.Click();
     CreateNew.Click();
     ProductName.SendKeys(Product);
     CategoryID.FindElement(By.XPath("//option[. = 'Seafood']")).Click();
     SupplierID.FindElement(By.XPath("//option[. = 'Leka Trading']")).Click();
     UnitPrice.SendKeys(Price);
     QuantityPerUnit.SendKeys(Quantity);
     UnitsInStock.SendKeys(Stock);
     UnitsOnOrder.SendKeys(Order);
     ReorderLevel.SendKeys(Level);
     Confirm.Click();
     return(new MainPage(driver));
 }
コード例 #2
0
 public MainPage Exist()
 {
     AllProducts.Click();
     TestProduct.Click();
     Assert.AreEqual(ProductName.GetAttribute("value"), "Test Product");
     Assert.AreEqual(CategoryID.FindElement(By.XPath("//option[. = 'Seafood']")).GetAttribute("text"), "Seafood");
     Assert.AreEqual(SupplierID.FindElement(By.XPath("//option[. = 'Leka Trading']")).GetAttribute("text"), "Leka Trading");
     Assert.AreEqual(UnitPrice.GetAttribute("value"), "111,0000");
     Assert.AreEqual(QuantityPerUnit.GetAttribute("value"), "222");
     Assert.AreEqual(UnitsInStock.GetAttribute("value"), "333");
     Assert.AreEqual(UnitsOnOrder.GetAttribute("value"), "444");
     Assert.AreEqual(ReorderLevel.GetAttribute("value"), "555");
     Home.Click();
     logoutField.Click();
     return(new MainPage(driver));
 }
コード例 #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ (ProductName != null ? ProductName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ SupplierId;
         hashCode = (hashCode * 397) ^ CategoryId;
         hashCode = (hashCode * 397) ^ (QuantityPerUnit != null ? QuantityPerUnit.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ UnitPrice.GetHashCode();
         hashCode = (hashCode * 397) ^ UnitsInStock.GetHashCode();
         hashCode = (hashCode * 397) ^ UnitsOnOrder.GetHashCode();
         hashCode = (hashCode * 397) ^ ReorderLevel.GetHashCode();
         hashCode = (hashCode * 397) ^ Discontinued.GetHashCode();
         return(hashCode);
     }
 }