public void Test_ClickNotVisibleButt() { navPan = new NavigationPanel(driver); navPan.Open(wait); //TouchActions touchActions = new TouchActions(driver); //touchActions.LongPress(recViewInstance.BtnCart).Move(recViewInstance.BtnMain.Location.X, recViewInstance.BtnMain.Location.Y).Release().Perform(); ElemHelper.ScrollToElement(driver, "Просмотренные"); navPan.BtnWatched.Click(); Thread.Sleep(5000); }
public void Test_CategoryClick() { navPan = new NavigationPanel(driver); navPan.Open(wait); navPan.BtnCatalog.Click(); CatalogPage catPage = new CatalogPage(driver); //ElemHelper.ScrollToElement(driver, catPage._childProducts); //catPage.ChildProducts.Click(); Thread.Sleep(5000); }
public void Test_AccountCartOpen() { navPanel = new NavigationPanel(driver); wait.Until((d) => navPanel.IsNavigationPanelOpened()); navPanel.OpenLoginPage(wait) .LogIn("*****@*****.**", "Testpassword1", wait); CartPage cartPage = navPanel .Open(wait) .OpenCart(wait); String actualTitle = cartPage.GetTitle(wait); String expectedTitle = "Корзина пуста"; StringAssert.AreEqualIgnoringCase(expectedTitle, actualTitle); }
public void Test_AccountWishListOpen() { navPanel = new NavigationPanel(driver); wait.Until((d) => navPanel.IsNavigationPanelOpened()); navPanel.OpenLoginPage(wait) .LogIn("*****@*****.**", "Testpassword1", wait); WishList localWishList = navPanel .Open(wait) .OpenWishLists(wait) .OpenGuestWishList(wait); String actualTitle = localWishList.EmptyTitle.Text; String expectedTitle = "Этот список пуст"; StringAssert.AreEqualIgnoringCase(expectedTitle, actualTitle); }
public bool AddLaptopsToCart() { navPanel = new NavigationPanel(driver); navPanel.OpenCatalogPage(wait).SelectCategory("Ноутбуки и компьютеры", wait); LaptopsCategory lapCat = new LaptopsCategory(driver); ProductsListPage productsList = lapCat.OpenAllLaptopsProductsList(wait); productsList.OpenSortPanel(wait). RbtnExpensiveCheap.Click(); List <String> laptopsModels = new List <String> { "GT75VR7RE-230UA", "GT758RF-239UA", "MPTU35/Z0UE" }; foreach (var item in laptopsModels) { AndroidElement currentProduct = productsList.GetProduct(item, wait); new ProductCompactView(driver, currentProduct).AddToCart(wait); } IList <AndroidElement> cartItems = navPanel. Open(wait). OpenCart(wait). GetCartItems(wait); laptopsModels.Reverse(); bool[] matchNames = new bool[3]; int count = 0; foreach (var item in cartItems) { var currText = new CartItemView(driver, item).GetTitle(wait); matchNames[count] = currText.Contains(laptopsModels[count]); Console.WriteLine(currText + " = " + laptopsModels[count]); count++; } return(matchNames[0] & matchNames[1] & matchNames[2]); }
public void ChooseSomeNotebooks() { navPan = new NavigationPanel(driver); navPan.OpenCatalogPage(wait).SelectCategory("Ноутбуки и компьютеры", wait); LaptopsCategory lapCat = new LaptopsCategory(driver); ProductsListPage productsList = lapCat.OpenAllLaptopsProductsList(wait); List <String> laptopsToAddNames = new List <String> { "90NB0HS1-M00450", "90NR0GN1-M03880", "80XL03UJRA" }; foreach (var item in laptopsToAddNames) { AndroidElement currentProduct = productsList.GetProduct(item, wait); new ProductCompactView(driver, currentProduct).BtnAddToWishList.Click(); } IList <AndroidElement> prodElemsInWishList = navPan. Open(wait). OpenWishLists(wait). OpenGuestWishList(wait). WishedProductsList; //List<String> wishListProductsNames = new List<String>(); bool[] result = new bool[3]; int count = 0; foreach (var item in prodElemsInWishList) { //wishListProductsNames.Add(new ProductCompactView(driver, item).ProductName.Text); result[count] = new ProductCompactView(driver, item).ProductName.Text.Contains(laptopsToAddNames[count]); count++; } //CollectionAssert.AreEquivalent(wishListProductsNames, laptopsToAddNames); Assert.IsTrue(result[0] & result[1] & result[2]); }
public bool AddLaptopsToWishList() { navPanel = new NavigationPanel(driver); navPanel.OpenCatalogPage(wait).SelectCategory("Ноутбуки и компьютеры", wait); LaptopsCategory lapCat = new LaptopsCategory(driver); ProductsListPage productsList = lapCat.OpenAllLaptopsProductsList(wait); productsList.OpenSortPanel(wait). RbtnExpensiveCheap.Click(); List <String> laptopsModels = new List <String> { "GT75VR7RE-230UA", "GT758RF-239UA", "MPTU35/Z0UE" }; foreach (var item in laptopsModels) { AndroidElement currentProduct = productsList.GetProduct(item, wait); //if (currentProduct != null) new ProductCompactView(driver, currentProduct).AddToWishList(wait); //else continue; new ProductCompactView(driver, currentProduct).AddToWishList(wait); } IList <AndroidElement> prodElemsInWishList = navPanel. Open(wait). OpenWishLists(wait). OpenGuestWishList(wait). WishedProductsList; bool[] matchNames = new bool[3]; int count = 0; foreach (var item in prodElemsInWishList) { matchNames[count] = new ProductCompactView(driver, item).ProductName.Text.Contains(laptopsModels[count]); count++; } return(matchNames[0] & matchNames[1] & matchNames[2]); }
public void Test_OpenNavPane() { navPan = new NavigationPanel(driver); navPan.Open(wait); Assert.IsTrue(navPan.IsNavigationPanelOpened()); }