public void Execute(object parameter) { SearchItemPage searchItemPage = parameter as SearchItemPage; ItemViewModel vm = searchItemPage.Resources["ItemVM"] as ItemViewModel; ItemPopup popup = new ItemPopup(); popup.Resources["ItemVM"] = vm; vm.IsItemPopup = true; ItemPopupViewModel popUpVM = popup.Resources["PopUpVM"] as ItemPopupViewModel; //TODO 내일 한다. 응애 ItemModel model = DBConnecter.getItem(1); popUpVM.Shop_Name = model.Shop_Name; popUpVM.Memo = model.Memo; popUpVM.Name = model.Name; popUpVM.Link = model.Link; popUpVM.Item_ID = model.Item_ID; popUpVM.Price = model.Price; if (model.Liked == 1) { popUpVM.Liked = true; } else { popUpVM.Liked = false; } popUpVM.Temp = model.Temp; popUpVM.Image = model.Image; popUpVM.Category = model.Category; popup.Show(); }
public void GivenNavigateToComsedHomepage() { SearchItemPage searchItemPage = new SearchItemPage(driver); driver.Navigate().GoToUrl(searchItemPage.homepage); driver.Manage().Window.Maximize(); }
private void LoginToApplication() { loginPage = mainPage.ClickSignIn(); loginPage.AddUserName(configReader.UserName); loginPage.AddPassword(configReader.Password); searchItemPage = loginPage.ClickSubmit(); }
public void showSearchItemPage(SearchItemModel pantryItem) { SearchItemPage searchItemPage = new SearchItemPage(); searchItemPage.BindingContext = new SearchItemViewModel(pantryItem); navigation.PushAsync(searchItemPage); }
public bool CanExecute(object parameter) { SearchItemPage searchItemPage = parameter as SearchItemPage; if (searchItemPage == null) { return(true); } ItemViewModel vm = searchItemPage.Resources["ItemVM"] as ItemViewModel; return(vm == null ? true : !(vm.IsItemPopup)); }
public void Execute(object parameter) { MainWindow window = parameter as MainWindow; MainViewModel vm = window.Resources["MainVM"] as MainViewModel; SearchViewPage searchPage = new SearchViewPage(); SearchItemPage searchItemPage = new SearchItemPage(); searchItemPage.Resources["ItemVM"] = vm.itemVM; vm.itemVM.searchItemPage = searchItemPage; searchPage.DataContext = vm; searchItemPage.DataContext = vm.itemVM; vm.itemVM.setItemlist(vm.Search_Text, 0); searchItemPage.itemListView.ItemsSource = vm.itemVM.items; searchPage.listframe.Navigate(searchItemPage); window.Mainframe.Navigate(searchPage); }
private void SelectItem(object sender, EventArgs e) { var itemNameLabel = sender as Label; var grid = itemNameLabel.Parent as Grid; var mrpEntry = grid.Children.Where(c => Grid.GetRow(c) == Grid.GetRow(itemNameLabel) && Grid.GetColumn(c) == 2).FirstOrDefault() as Entry; var searchItemPage = new SearchItemPage("Select Item", false); searchItemPage.ItemsListView.ItemTapped += (source, args) => { var item = args.Item as Item; itemNameLabel.Text = item.ItemName; mrpEntry.Text = item.MRP; Navigation.PopAsync(); }; Navigation.PushAsync(searchItemPage); }
public void ThenAllStarWarsItemsShouldBeListed() { SearchItemPage searchItemPage = new SearchItemPage(driver); Assert.IsTrue(searchItemPage.IslistedItemsDisplayed()); }
public void WhenClickOnTheSearchingButton() { SearchItemPage searchItemPage = new SearchItemPage(driver); searchItemPage.ClickSearchButton(); }
public void WhenIEnterToTheSearchingField(string SearchingWord) { SearchItemPage searchItemPage = new SearchItemPage(driver); searchItemPage.EnterSearchingWord(SearchingWord); }
public SearchItemSteps() { Search = new SearchItemPage(); Common = new CommonFunctions(); }
//public Keywords(ExtentTest test) : base(test) //{ //} /// <summary> /// Desc:Method is used to read excel sheets and execute the keywords accordingly /// </summary> /// <param name="testUnderExecution"></param> /// <param name="xls"></param> /// <param name="testData"></param> public void executeKeywords(string testUnderExecution, ExcelReader xls, Dictionary <string, string> testData) { SearchItemPage sPage = new SearchItemPage(); LoginPage lPgae = new LoginPage(); string KeywordsSheet = Enum.Sheets.Keywords.ToString(); int rows = xls.getRowCount(KeywordsSheet); // app.reportFailure("xxxxx"); for (int rNum = 2; rNum <= rows; rNum++) { string tcid = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.TC_Id.ToString(), rNum); if (tcid.Equals(testUnderExecution)) { string data = null; string keyword = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.Keyword.ToString(), rNum); string locatorName = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.LocatorName.ToString(), rNum); string key = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.Data.ToString(), rNum); string runMode = xls.getCellData(KeywordsSheet, Enum.KeywordsColumn.RunMode.ToString(), rNum); Dictionary <string, string> locatorData = DataUtility.locatorData(xls, locatorName); if (!key.Equals("")) { data = testData[key]; } // test.Log(LogStatus.Info, tcid + " -- " + keyword + " -- " + objct + " -- " + data); Enum.LogStatus resultStatus = Enum.LogStatus.Passed; switch (keyword) { case "openbrowser": resultStatus = openBrowser(data); break; case "navigate": resultStatus = navigate(); break; case "click": resultStatus = ClickOnElementWhenElementFound(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), locatorName); break; case "input": resultStatus = SendKeysForElement(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), data, locatorName); break; case "wait": resultStatus = threadWait(5000); break; case "hover": resultStatus = mouseHoverWithoutClick(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), locatorName); break; case "hoverClick": resultStatus = mouseHover(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault()); break; case "jsClick": resultStatus = jsClick(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault()); break; case "inputAndEnter": resultStatus = SendKeysForAElement(locatorData.Keys.FirstOrDefault(), locatorData.Values.FirstOrDefault(), data, locatorName); break; case "searchMobileAndSelect": sPage.searchMobileAndSelect(xls, data); break; case "amazonLogin": lPgae.amazonLogin(testData); break; case "verifyLogin": lPgae.verifyLogin(testData); break; case "verifyItemAddedToCart": sPage.verifyItemAddedToCart(); break; } if (!resultStatus.Equals(Enum.LogStatus.Passed)) { Assert.Fail(resultStatus.ToString()); } } } }
public ItemID_SearchPage_Class(object idx, object sp) { ItemID = (int)idx; _SearchItemPage = sp as SearchItemPage; }
public ItemID_SearchPage_Class(int idx, SearchItemPage sp) { ItemID = idx; _SearchItemPage = sp; }