public void tc_63777_Managers_Report_Training_Assignment_Exemptions_User_Manager() { Driver.focusParentWindow(); _test.Log(Status.Info, "Closes pdf window"); CommonSection.Logout(); LoginPage.LoginAs("usermanager").WithPassword("").Login(); _test.Log(Status.Info, "Login as user Manager"); CommonSection.Administer.System.Reporting.ReportConsole(); ReportsConsolePage.SearchText("Manager's Report - Training Assignment Exemptions"); // Search for the Survey Report Assert.IsTrue(ReportsConsolePage.DisplayResult >= 1); // Verify the report is displayed in Results ReportsConsolePage.ClickManagersReportTrainingAssignmentExemptionsTitle(); // SearchReportTitle("Manager's Report: Training Assignment"); _test.Log(Status.Info, "Clicked Manager's Report - Training Assignment Exemptions Title"); DetailsPage.ClickSelect(); _test.Log(Status.Info, "Clicked Select"); Assert.IsTrue(RunReportPage.isManagersReport_TrainingAssignmentsExemptionsLabeldisplay()); Assert.IsTrue(RunReportPage.isExemptionTypeTypedisplay()); RunReportPage.ClickRunReport(); _test.Log(Status.Info, "CLicked Run report"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyPageComponents("Print", "SaveNew", "ViewLayouts", "Refresh", "CloseWindow", "ExportToExcel", "ExportToPDF", "ExportToXML", "ExportToCSV")); _test.Log(Status.Pass, "Verify all menus like print, close windows, export to pdf, export tot excel are displaying"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyManagersReportTrainingAssignmentsExemptionslevelColumns()); _test.Log(Status.Pass, "Verify some Managers Report_Training Assignment Exeptions level columns are display in report"); MeridianGlobalReportingPage.ClickTabileEditicon(); MeridianGlobalReportingPage.CustomizeTable.SelectLoginId(); Assert.IsTrue(MeridianGlobalReportingPage.verifyLoginidAddedtoreportTable()); _test.Log(Status.Pass, "Verify new column added into result grid"); }
private async void Refresh_Clicked(object sender, EventArgs e) { await DetailsPage.DoActionAsync(1); Log.Track(Const.REFRESH_ALL); OnlyClose(); }
public void tc_63679_Organization_Report_Training_Assignments_by_User_Org_Manager() { Driver.focusParentWindow(); _test.Log(Status.Info, "Closes pdf window"); CommonSection.Administer.System.Reporting.ReportConsole(); ReportsConsolePage.SearchText("Organization Report - Training Assignments by User"); // Search for the Survey Report Assert.IsTrue(ReportsConsolePage.DisplayResult >= 1); // Verify the report is displayed in Results ReportsConsolePage.ClickSearchReportTitle("Organization Report - Training Assignments by User"); _test.Log(Status.Info, "Clicked Organization Report - Training Assignments by Content Item Title"); DetailsPage.ClickSelect(); _test.Log(Status.Info, "Clicked Select"); RunReportPage.CLickSearchButton(); RunReportPage.SelectFirstresultandClickSelect(); Assert.IsTrue(RunReportPage.isOrganizationReport_TrainingAssignmentsbyUserLabeldisplay()); Assert.IsTrue(RunReportPage.Organization.isdisplay("Sample Organization 1")); Assert.IsTrue(RunReportPage.Organization.isSelectble("Sample Organization 1")); _test.Log(Status.Info, "Verify use can select only Sample Organization 1"); RunReportPage.ClickRunReport(); _test.Log(Status.Info, "CLicked Run report"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyPageComponents("Print", "SaveNew", "ViewLayouts", "Refresh", "CloseWindow", "ExportToExcel", "ExportToPDF", "ExportToXML", "ExportToCSV")); _test.Log(Status.Pass, "Verify all menus like print, close windows, export to pdf, export tot excel are displaying"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyOrganizationReportTrainingAssignmenstbyUserlevelColumns()); _test.Log(Status.Pass, "Verify some Organization Report_Training Assignment by User level columns are display in report"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyOrgName("Sample Organization 1")); _test.Log(Status.Pass, "Verify Sample Org 1 is display in report header"); MeridianGlobalReportingPage.ClickTabileEditicon(); MeridianGlobalReportingPage.CustomizeTable.SelectContentActivity(); Assert.IsTrue(MeridianGlobalReportingPage.verifyContentActivityAddedtoreportTable()); _test.Log(Status.Pass, "Verify new column added into result grid"); }
private ListView CreateMatchesListView() { var cell = new DataTemplate(typeof(TextCell)); cell.SetBinding(TextCell.TextProperty, "Title"); cell.SetValue(TextCell.TextColorProperty, Color.Black); //cell.SetValue(TextCell.TextProperty, Font.SystemFontOfSize(NamedSize.Micro)); var listView = new ListView { RowHeight = 40, ItemTemplate = cell }; listView.ItemTemplate.SetBinding(TextCell.TextProperty, "Title"); listView.ItemTapped += async(sender, e) => { var soccerEvent = (SoccerEvent)e.Item; var detailsPage = new DetailsPage(soccerEvent.EventId); await Navigation.PushAsync(detailsPage); }; var soccerEvents = new SoccerEventsService().Get(); soccerEvents.ContinueWith((task) => { listView.ItemsSource = task.Result; }, TaskScheduler.FromCurrentSynchronizationContext()); return(listView); }
public void A11_Section_Management_Enrollment_Report_Drilldown_35325() { CommonSection.Administer.System.Reporting.ReportConsole(); _test.Log(Status.Info, "it opens Report Console"); ReportsConsolePage.SearchText("Classroom Course Enrollment Summary"); _test.Log(Status.Info, "Search For Classroom Course Enrollment Summary"); ReportsConsolePage.ClickDisplayResult(); _test.Log(Status.Info, "Click Classroom Course Enrollment Summary Link"); ClassroomCourseEnrollmentPage.ClickSelect(); _test.Log(Status.Info, "Click Select Button"); Assert.IsTrue(RunReportPage.isOrganizationDisplayed()); _test.Log(Status.Pass, "Verify Organization is Displayed"); Assert.IsFalse(RunReportPage.isIncludeSubOrganizationDisplayed()); _test.Log(Status.Pass, "Verify Select organization is Displayed"); RunReportPage.RunReportWith("Active", "12/16/2018", "1/16/2018", "Less Than/Equal To", "9", "Less Than/Equal To", "9", "25", "Default"); _test.Log(Status.Info, "Fill Data And Click Run Report"); Assert.IsTrue(MeridianGlobalReportingPage.isDisplayed()); _test.Log(Status.Pass, "Verify Meridian Global Reporting Page is Displayed "); MeridianGlobalReportingPage.ClickDetails(); _test.Log(Status.Info, "Clicked go button having details selected and opens details page"); MeridianGlobalReportingPage.ClickUserProgress(); MeridianGlobalReportingPage.ClickDetails(); _test.Log(Status.Info, "Clicked go button having details selected and opens details page"); Assert.IsTrue(DetailsPage.CheckDetailsTabText.EndsWith("Details")); DetailsPage.ClickCloseWindowlink(); _test.Log(Status.Info, "Details page closes"); Assert.IsTrue(MeridianGlobalReportingPage.Title == "Meridian Global Reporting"); MeridianGlobalReportingPage.CloseWindow(); _test.Log(Status.Info, "Closes pdf window"); Assert.IsTrue(RunReportPage.Title == "Run Report"); Assert.IsTrue(Driver.focusParentWindow()); }
public MainPageViewModel() { pkmToFind = 151; logoPath = $"Data/Misc/Logo.png"; aboutTitle = $"PokePedia v0.1.1"; aboutText = "https://github.com/aleuts \n\nRefresh DataBase?"; isRefrshing = false; isSearchResultsListVisible = false; pkmManager = new PokedexManagerModel(); dataManager = new DataManager(); detailsPageView = new DetailsPage(); detailsPageViewModel = new DetailsPageViewModel(); RefreshDataBaseCommand = new Command(async() => await LoadPokemonList(pkmToFind)); PerformSearchCommand = new Command <string>((string query) => { SearchSuggestionsCollection = GetSearchResults(query ?? string.Empty); }); ItemTappedCommand = new Command <PokedexModel>(async p => await ItemTapped(p)); GridFocusedCommand = new Command(SetSearchBarFocus); ShowAboutCommand = new Command(async() => await ShowAbout()); RefreshDataBaseCommand.Execute(null); }
public Notifications(Cloud cloudViewModel) { this.cloudViewModel = cloudViewModel; Delete = new Command <Notification>(async(parameter) => await delete(parameter)); DeleteAll = new Command(async() => await deleteAll()); ShowFailedRecordingTip = new Command <bool>((parameter) => { if ((cloudViewModel != null) && (cloudViewModel.DeviceOrientation == DeviceOrientation.Portrait)) { if (parameter) { DetailsPage details = new DetailsPage(); details.InsertChild(new FailedRecordingTip()); Application.Current.MainPage.Navigation.PushAsync(details); } else { Application.Current.MainPage.Navigation.PopAsync(); } } else { FailedRecordingTipVisible = parameter; } }); }
public void VerifyThatExtraFiltersAreCorrectlySetTest() { DetailsPage detailspage = new DetailsPage(driver); HomePage homepage = new HomePage(driver); ResultsPage resultspage = new ResultsPage(driver); BasePage basepage = new BasePage(driver); basepage.GoToUrl(Constants.Url); homepage.SelectDestination(Constants.Destination); homepage.SelectCheckInDate(); homepage.SelectCheckOutDate(); homepage.SelectGuests(2, 1, 0); homepage.ClickSearchButton(); Thread.Sleep(2000); resultspage.ClickMoreFilters(); resultspage.IncreaseBedrooms(5); int selectedNrOfBedrooms = resultspage.ExtractNrOfBedroomsFromFilter(); resultspage.SelectPoolFacility(); resultspage.ClickShowStaysButton(); resultspage.VerifyNumberOfAppliedFilters(2); resultspage.VerifyTheNrOfBedrooms(selectedNrOfBedrooms); resultspage.OpenFirstSearchResult(); detailspage.VerifyFacilities(Constants.Pool); basepage.QuitDriver(); }
public void tc_24975_Domain_Report_Training_Assignments_by_Content_Item_Admin() { Driver.focusParentWindow(); _test.Log(Status.Info, "Closes pdf window"); CommonSection.Administer.System.Reporting.ReportConsole(); ReportsConsolePage.SearchText("Domain Report - Training Assignments by Content Item"); // Search for the Survey Report Assert.IsTrue(ReportsConsolePage.DisplayResult >= 1); // Verify the report is displayed in Results ReportsConsolePage.ClickSearchReportTitle("Domain Report - Training Assignments by Content Item"); _test.Log(Status.Info, "Clicked Domain Report - Training Assignments by Content Item Title"); DetailsPage.ClickSelect(); _test.Log(Status.Info, "Clicked Select"); RunReportPage.CLickSearchButton(); RunReportPage.SelectFirstresultandClickSelect(); Assert.IsTrue(RunReportPage.isDomainReport_TrainingAssignmentsbyContentItemLabeldisplay()); RunReportPage.ClickRunReport(); _test.Log(Status.Info, "CLicked Run report"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyPageComponents("Print", "SaveNew", "ViewLayouts", "Refresh", "CloseWindow", "ExportToExcel", "ExportToPDF", "ExportToXML", "ExportToCSV")); _test.Log(Status.Pass, "Verify all menus like print, close windows, export to pdf, export tot excel are displaying"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyDomainReportTrainingAssignmenbyContentItemlevelColumns()); _test.Log(Status.Pass, "Verify some Domain Report_Training Assignment by Content Item level columns are display in report"); MeridianGlobalReportingPage.ClickTabileEditicon(); MeridianGlobalReportingPage.CustomizeTable.SelectLoginId(); Assert.IsTrue(MeridianGlobalReportingPage.verifyLoginidAddedtoreportTable()); _test.Log(Status.Pass, "Verify new column added into result grid"); }
public void A09_Content_Usage_Report_Progress_Status_35346() { CommonSection.Administer.System.Reporting.ReportConsole(); ReportsConsolePage.SearchText("Content Usage"); // Search for the Survey Report Assert.IsTrue(ReportsConsolePage.DisplayResult >= 1); // Verify the report is displayed in Results ReportsConsolePage.ClickContentUsageTitle(); _test.Log(Status.Info, "Clicked Content Usage Title"); DetailsPage.ClickSelect(); _test.Log(Status.Info, "Clicked Select"); Assert.IsTrue(RunReportPage.isOrganizationDisplayed()); Assert.IsTrue(RunReportPage.isCotentActivityDisplay()); RunReportPage.ProgessStatusDropdown.SelectProgressStatus("Completed"); RunReportPage.ClickRunReport(); _test.Log(Status.Info, "CLicked Run report"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyPageComponents("Print", "SaveNew", "ViewLayouts", "Refresh", "CloseWindow", "ExportToExcel", "ExportToPDF", "ExportToXML", "ExportToCSV")); _test.Log(Status.Pass, "Verify all menus like print, close windows, export to pdf, export tot excel are displaying"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyContentUsageReportlevelColumns()); _test.Log(Status.Info, "Verify some Content Usage rreport colums are display in report"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyContentUsageReportsDisplay()); _test.Log(Status.Info, "Verify some Content Report are display into result grid"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyCompletdColumnValue() > 0); _test.Log(Status.Info, "Verify Completed column value is more than 0"); MeridianGlobalReportingPage.CloseWindow(); _test.Log(Status.Info, "Closes pdf window"); RunReportPage.ProgessStatusDropdown.SelectProgressStatus("No Progress"); RunReportPage.ClickRunReport(); _test.Log(Status.Info, "CLicked Run report"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyPageComponents("Print", "SaveNew", "ViewLayouts", "Refresh", "CloseWindow", "ExportToExcel", "ExportToPDF", "ExportToXML", "ExportToCSV")); _test.Log(Status.Pass, "Verify all menus like print, close windows, export to pdf, export tot excel are displaying"); Assert.IsTrue(MeridianGlobalReportingPage.VerifyCompletdColumnValue() == 0); _test.Log(Status.Info, "Verify Completed column value is 0"); MeridianGlobalReportingPage.CloseWindow(); }
public void P20_1_z07_My_Training_Progress_Report_24843() { //Assert.IsTrue(true); //as it is running as part of smoke test. CommonSection.Administer.System.Reporting.ReportConsole(); _test.Log(Status.Info, "opened reports console from kview"); ReportsConsolePage.SearchText("My"); _test.Log(Status.Info, "Searched My"); Assert.IsTrue(ReportsConsolePage.DisplayResult > 1);//checks results display more than 1 ReportsConsolePage.ClickMyTrainingProgress(); _test.Log(Status.Info, "Clicked My Training Progress"); DetailsPage.ClickSelect(); _test.Log(Status.Info, "Clicked Select"); RunReportPage.ClickRunReport(); _test.Log(Status.Info, "CLicked Run report"); // Assert.IsTrue(MeridianGlobalReportingPage.Displays>1); MeridianGlobalReportingPage.ClickDetails(); _test.Log(Status.Info, "Clicked go button having details selected and opens details page"); //Assert.IsTrue(DetailsPage.CheckDetailsTabText.EndsWith("Details"));//retrieves the text from details tab DetailsPage.ClickCloseWindowlink(); _test.Log(Status.Info, "Details page closes"); Assert.IsTrue(MeridianGlobalReportingPage.Title == "Meridian Global Reporting"); // RunReportPage.ClickRunReport(); Assert.IsTrue(MeridianGlobalReportingPage.Displays > 1); DetailsPage.ClickExporttoPDF(); _test.Log(Status.Info, "CLick export to pdf"); Assert.IsTrue(MyTrainingProgressPDFPage.Title.EndsWith("My_Training_Progress.pdf")); // MyTrainingProgressPDFPage.ClickBrowsertabX(); // Assert.IsTrue(DetailsPage.Displays>1); //MeridianGlobalReportingPage.CloseWindow(); Assert.IsTrue(Driver.focusParentWindow()); _test.Log(Status.Info, "Closes pdf window"); Assert.IsTrue(RunReportPage.Title == "Run Report"); // Assert.IsTrue(Driver.focusParentWindow()); CommonSection.Avatar.Reports(); _test.Log(Status.Info, "open reports from KI"); ReportsPage.MyTrainingProgress.ClickRunReport(); _test.Log(Status.Info, "opens run report page from KI"); ReportsPage.ReportCriteriaModal.ClickRunReport(); _test.Log(Status.Info, "click run report from KI"); MeridianGlobalReportingPage.ClickDetails(); _test.Log(Status.Info, "click the go button having details option displayed"); string restext = DetailsPage.CheckDetailsTabText; StringAssert.EndsWith("Details", restext); DetailsPage.ClickCloseWindowlink(); _test.Log(Status.Info, "closed the details page "); Assert.IsTrue(MeridianGlobalReportingPage.Title == "Meridian Global Reporting"); // RunReportPage.ClickRunReport(); Assert.IsTrue(MeridianGlobalReportingPage.Displays > 1); DetailsPage.ClickExporttoPDF(); _test.Log(Status.Info, "CLick export to pdf"); Assert.IsTrue(MyTrainingProgressPDFPage.Title.EndsWith("My_Training_Progress.pdf")); MeridianGlobalReportingPage.CloseWindow(); _test.Log(Status.Info, "CLose window meridian global reporting page"); StringAssert.AreEqualIgnoringCase(RunReportPage.Title, "Reports"); }
public void OneTimeSetUp() { p_home = new HomePage(web_driver); web_driver = p_home.DriverConn(); p_windows = new WindowsPage(web_driver); p_search = new SearchPage(web_driver); p_details = new DetailsPage(web_driver); p_cart = new CartPage(web_driver); }
private async void Search_ClickedAsync(object sender, EventArgs e) { if (!string.IsNullOrEmpty(MasterPage.Keyword.Text)) { await DetailsPage.DoActionAsync(2, MasterPage.Keyword.Text); Log.Track(Const.SEARCH); OnlyClose(); } }
public void ShowDetails() { var page = new DetailsPage() { BindingContext = new DetailsViewModel { SelectedProduct = SelectedProduct } }; App.Current.MainPage.Navigation.PushAsync(page); }
private void DisplayBurger() { if (selectedBurger != null) { var viewModel = new DetailsViewModel { SelectedBurger = selectedBurger, Burgers = burgers, Position = burgers.IndexOf(selectedBurger) }; var detailsPage = new DetailsPage { BindingContext = viewModel }; } }
public void ItemSelected(UICollectionView collectionView, NSIndexPath indexPath) { var item = viewModel.Images[indexPath.Row]; var page = new DetailsPage(item, viewModel); var controller = page.CreateViewController(); controller.EdgesForExtendedLayout = UIRectEdge.None; NavigationController.PushViewController(controller, true); }
public void InputValidDetails_ShouldProceedSuccessfully() { base.Driver.Navigate().GoToUrl(base.BaseUri); LoginPage loginPage = new LoginPage(base.Driver); DetailsPage detailsPage = new DetailsPage(base.Driver); loginPage.Login(); base.WaitForElementPresent(By.Id("socialIcons")); Assert.AreEqual("Софтуерна академия на Телерик (безплатни видео курсове и уроци) - Телерик Академия - Студентска система (students system)", base.Driver.Title); detailsPage.EnterDetailsDefaultValues(); this.Driver.GetElement(By.Id("ExitMI")); }
public void VerifyRowDeletion() { HomePage homePage = new HomePage(driverManager.driver); LoginPage loginPage = homePage.clickLoginButton(); DashboardPage dashboardpage = loginPage.Login("*****@*****.**", "admin"); GigsPage gigsPage = dashboardpage.ClickGigsTab(); string firstExpiredRowId = gigsPage.ReturnId(); DetailsPage detailsPage = gigsPage.ClickEyeButton(); NUnit.Framework.Assert.IsTrue(detailsPage.IsExpiredPresent()); GigsPage gigsPage2 = detailsPage.ClickDeleteButton(); NUnit.Framework.Assert.IsTrue(gigsPage2.IsIdAbsent(firstExpiredRowId)); }
public void GivenIHaveSetYourEnergyPageElectricityOnlySectionWithTableInformation(Table table) { var homeSize = table.Rows[0][0]; var numberOfPeople = table.Rows[0][1]; var sourceOfHeating = table.Rows[0][2]; var temperature = table.Rows[0][3]; var insulation = table.Rows[0][4]; var cookingEnergySource = table.Rows[0][5]; var timesAtHome = table.Rows[0][6]; _detailsPage = _helperClass.BaseClass.YourEnergyPage .ElectricityEnergyUsage(homeSize, numberOfPeople, sourceOfHeating, temperature, insulation, cookingEnergySource, timesAtHome).GoToYourDetailsPage(); }
private void MediaContentViewModel_OnSelectedItemDetailsChanged(object sender, EventArgs e) { var selected = mediaContentViewModel.SelectedItem; if ((selected != null) && (SelectedItem == CloudItem.Content) && (DeviceOrientation == DeviceOrientation.Portrait) && !selected.IsFolder) { DetailsPage details = new DetailsPage() { BindingContext = this }; details.InsertChild(new ContentItemDetailsView()); Application.Current.MainPage.Navigation.PushAsync(details); } }
private void DisplayBurger() { if (selectedBurger != null) { var viewModel = new DetailsViewModel { //SelectedBurger = selectedBurger, Burgers = burgers, Position = burgers.IndexOf(selectedBurger) }; var detailsPage = new DetailsPage { BindingContext = viewModel }; var navigation = Application.Current.MainPage as NavigationPage; navigation.PushAsync(detailsPage, true); } }
private void NotificationsViewModel_OnSelectedItemDetailsChanged(object sender, EventArgs e) { var selected = notificationsViewModel.SelectedItem; if ((selected != null) && (SelectedItem == CloudItem.Notifications) && (DeviceOrientation == DeviceOrientation.Portrait)) { DetailsPage details = new DetailsPage() { BindingContext = this }; details.InsertChild(new NotificationItemDetails()); Application.Current.MainPage.Navigation.PushAsync(details); } }
private void DisplayPizza() { if (selectedPizza != null) { var viewModel = new DetailsViewModel { SelectedPizza = selectedPizza, Pizzas = pizzas, Position = pizzas.IndexOf(selectedPizza) }; var detailsPage = new DetailsPage { BindingContext = viewModel }; var navigation = Application.Current.MainPage as NavigationPage; navigation.PushAsync(detailsPage, true); } }
public void AssertDetailsAreCorrect(string employeeId, string hourlyrate, string day, string hours, string minutes) { DetailsPage dp = new DetailsPage(driver); if (!driver.Url.Contains("https://codat-qa-task.azurewebsites.net/Details")) { throw new InvalidElementStateException(); } dp.EmployeeIdAssert(employeeId); //dp.HourlyRateAssert(hourlyrate); dp.DayAssert(day); dp.HourAssert(hours); dp.MinutesAssert(minutes); }
public void DisplayAdvert() { if (selectedAdvert != null) { var viewModel = new DetailsViewModel { SelectedAdvert = selectedAdvert, Adverts = adverts, Position = adverts.IndexOf(selectedAdvert) }; var detailsPage = new DetailsPage { BindingContext = viewModel }; var navigation = Application.Current.MainPage as NavigationPage; navigation.PushAsync(detailsPage, true); } }
/* * Display in a new page the details about the given wish selected by the user */ private void DisplayAWish() { if (_selectedWish != null) { // Sending the properties to the DetailsViewModel and pushing it to the bindingcontext on the "details" Page var viewModel = new DetailsViewModel { SelectedWish = _selectedWish, Wishes = MyWishCollection, Position = MyWishCollection.IndexOf(_selectedWish) }; var detailsPage = new DetailsPage(); detailsPage.BindingContext = viewModel; // navigate to the details page var navigation = Application.Current.MainPage as NavigationPage; navigation.PushAsync(detailsPage, true); _selectedWish = null; } }
public PatientViewModel() { InitialiseCommands(); patientService = new PatientService(); patients = new ObservableCollection <Patient>(); PopulatePatients(); homePage = new HomePage(); detailsPage = new DetailsPage(); homePage.DataContext = this; detailsPage.DataContext = this; SwitchToHomePage(); }
public void WhenItemIsAddedToCart() { details = new DetailsPage(); PageFactory.InitElements(_driver, details); //Compare the price Assert.AreEqual(uniqueprice, cast.StringToInt(details.lbl_OurPrice.Text)); Assert.AreEqual(uniqueprice, cast.StringToInt(details.lbl_buyboxPrice.Text)); details.btn_AddtoCart.Click(); //Try catch acts funky due combination of explicit and explicit wait try { IWebElement cartSideSheet = wait.Until(e => e.FindElement(By.Id("attach-sidesheet-view-cart-button"))); cartSideSheet.Click(); } catch (Exception a) { IWebElement cartSideSheet = wait.Until(e => e.FindElement(By.Id("hlb-view-cart-announce"))); cartSideSheet.Click(); }; }
private async void SaveChanges(object sender, RoutedEventArgs e) { DetailsPage page = (DetailsPage)sender; if (page.Customer.NeedToSave == true) { MessageDialogResult result = await MainWindow.Instance.ShowMessageAsync(this.Title, "Do You Want to Save Changes?", MessageDialogStyle.AffirmativeAndNegative); if (result == MessageDialogResult.Affirmative) { DetailsPage.Instance.CustomerDetailsSaveButton_Click(sender, e); } else { DetailsPage.Instance.clearDetailsPage(); } Session.LogOutSelectedCustomer(); } Session.LogOutSelectedCustomer(); }
private async void RenderDetailsPage(ViewOptions options, HttpContext context) { var parts = context.Request.Path.Value.Split('/'); var id = Guid.Empty; if (!Guid.TryParse(parts[parts.Length - 1], out id)) { context.Response.StatusCode = 400; await context.Response.WriteAsync("Invalid Id"); return; } var model = new DetailsPageModel() { Activity = _store.GetActivities().Where(a => a.Id == id).FirstOrDefault(), Options = options }; var detailsPage = new DetailsPage(model); await detailsPage.ExecuteAsync(context); }
public App() { var items = Device.OS == TargetPlatform.iOS ? Demos.SamplesForPlatform(Demos.Platform.iOS) : Device.OS == TargetPlatform.Android ? Demos.SamplesForPlatform(Demos.Platform.Android) : Device.OS == TargetPlatform.Windows ? Demos.SamplesForPlatform(Demos.Platform.UWP) : Demos.SamplesForPlatform(Demos.Platform.All); var masterDetail = new MasterDetailPage { IsGestureEnabled = true, MasterBehavior = MasterBehavior.Popover }; var detailPage = new DetailsPage(items.First()); var navPage = new NavigationPage(detailPage) { BarBackgroundColor = XamarinBlue, BarTextColor = Color.White, }; var masterPage = new MasterPage(items, demo => { masterDetail.IsPresented = false; detailPage.SetDemo(demo); navPage.Title = demo; }); if (Device.OS == TargetPlatform.iOS) { masterPage.Icon = "hamburger.png"; } masterDetail.Master = masterPage; masterDetail.Detail = navPage; MainPage = masterDetail; masterDetail.IsPresented = true; }
public void Given_a_view() { _page = Host.Instance.NavigateToInitialPage<HomePage>() .GoToDetailsPage(); }