示例#1
0
 public ChooseWindow(SellPageVM pageVM)
 {
     InitializeComponent();
     this.pageVM             = pageVM;
     page                    = pageVM.Page;
     ops                     = new Operations();
     listOfItems.ItemsSource = ops.GetItems();
 }
示例#2
0
        public void NavigateToSellPage()
        {
            LandingPage lp = new LandingPage(driver);

            FunctionLibrary.Screenshot("LandingPageScreenshot2");
            SellPage sp = lp.ClickOnSellLink();

            FunctionLibrary.Screenshot("SellPageScreenshot");
        }
 public SellPageVM(SellPage page)
 {
     Page        = page;
     ShowItems   = new ShowItemsToSellCommand(this, new Operations());
     SellCommand = new SellCommand(page);
     ItemsToSell = new ObservableCollection <Item>();
     Page.dataGrid.ItemsSource = ItemsToSell;
     Page.time.Text            = DateTime.Now.ToString();
 }
示例#4
0
        public void TestNavigationOfHomePageTabs()
        {
            HomePage home = new HomePage(driver);

            home.goToPage();
            Assert.IsNotNull(home);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/");
            test.Log(LogStatus.Pass, "Home Page Loaded successfully");

            RentPage rentPage = home.goToRentPage();

            Assert.IsNotNull(rentPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/?mode=rent");
            test.Log(LogStatus.Pass, "Rent Page Loaded successfully");



            NewHomesPage newHomesPage = rentPage.goToNewHomesPage();

            Assert.IsNotNull(newHomesPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/new-homes");
            test.Log(LogStatus.Pass, "New Homes Page Loaded successfully");

            SoldPage soldPage = newHomesPage.goToSoldPage();

            Assert.IsNotNull(soldPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/?mode=sold");
            test.Log(LogStatus.Pass, "Sold Page Loaded successfully");


            CommercialPage commercialPage = soldPage.goToCommercialPage();

            Assert.IsNotNull(commercialPage);
            Assert.AreEqual(driver.Url, "https://www.commercialrealestate.com.au/");
            test.Log(LogStatus.Pass, "Commercial Page Loaded successfully");

            home = commercialPage.goBackToDomainPage();
            Assert.IsNotNull(home);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/");
            test.Log(LogStatus.Pass, "Home Page ReLoaded successfully");

            SellPage sellPage = home.goToSellPage();

            Assert.IsNotNull(sellPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/sell?hp=1");
            test.Log(LogStatus.Pass, "Sell Page Loaded successfully");

            NewsPage newsPage = sellPage.goToNewsPage();

            Assert.IsNotNull(newsPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/news/");
            test.Log(LogStatus.Pass, "News Page Loaded successfully");


            AgentsPage agentsPage = newsPage.goToAgentsPage();

            Assert.IsNotNull(agentsPage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/real-estate-agents/");
            test.Log(LogStatus.Pass, "Agents Page Loaded successfully");


            MorePage morePage = agentsPage.goToMorePage();

            Assert.IsNotNull(morePage);
            Assert.AreEqual(driver.Url, "https://www.domain.com.au/home?mode=share");
            test.Log(LogStatus.Pass, "More Page Loaded successfully");


            IWebElement savedTab = morePage.goToSavedSearchesPage();

            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            Assert.IsNotNull(savedTab);
            test.Log(LogStatus.Pass, "Saved Searches Page Loaded successfully");


            IWebElement shortListTab = morePage.goToShortListpropertyPage();

            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            Assert.IsNotNull(shortListTab);
            test.Log(LogStatus.Pass, "Shortlist Property Page Loaded successfully");


            SignInPage signInPage = morePage.goTosignInPageTab();

            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            Assert.IsNotNull(signInPage);
            Assert.IsTrue(driver.Url.Contains("https://auth.domain.com.au/v1/login?signin"));
            signInPage.goBack();
            test.Log(LogStatus.Pass, "SignIn Page Loaded successfully");


            SignUpPage signUpPage = morePage.goTosignUpPageTab();

            Assert.IsNotNull(signUpPage);
            Assert.IsTrue(driver.Url.Contains("https://auth.domain.com.au/v1/signup?signin"));
            driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
            test.Log(LogStatus.Pass, "SignUp Page Loaded successfully");
        }
示例#5
0
 public SellCommand(SellPage page)
 {
     _page = page;
     _ops  = new Operations();
 }
        private async Task CheckContectNo()
        {
            if (!App.isBusy)
            {
                try
                {
                    if (HasErrors)
                    {
                        App.isBusy = false;
                        ScrollToControlProperty(GetFirstInvalidPropertyName);
                    }
                    else
                    {
                        if (!string.IsNullOrEmpty(Customer_Class.Contact_No))
                        {
                            if (_Get_Btn_Text == "Get")
                            {
                                var Wait = UserDialogs.Instance.Loading("Wait..", null, null, true, MaskType.Black);
                                Wait.Show();
                                JObject result = await _IAllDataServices.GetCustomerByMobileNo(Customer_Class);

                                if (result != null)
                                {
                                    App.isBusy = false;
                                    string type = result["Type"].ToString();
                                    if (type == "1")
                                    {
                                        _Show_And_Hide_Stack = true;
                                        _Get_Btn_Text        = "Cancel";
                                        _Text_Enable         = false;

                                        //await App.Current.MainPage.DisplayAlert("Success!", "Customer : " + (string)result["Result"]["Customer_Name"] + " Is Registered", "Ok");
                                        Franchise_Sell_Class_Data.Customer_Id = (int)result["Result"]["Customer_Id"];
                                        Customer_Class customer_ = new Customer_Class();
                                        customer_.Contact_No    = result["Result"]["Contact_No"].ToString();
                                        customer_.Email_Id      = result["Result"]["Email_Id"].ToString();
                                        customer_.Customer_Name = result["Result"]["Customer_Name"].ToString();
                                        CustomerClassToBind     = customer_;

                                        Franchise_Sell_Class_Data.Customer_Class_Data = Customer_Class;
                                    }
                                    else
                                    {
                                        App.isBusy           = false;
                                        Registration_layout  = true;
                                        _Show_And_Hide_Stack = true;
                                        _Get_Btn_Text        = "Cancel";
                                        //await App.Current.MainPage.DisplayAlert("Error!", (string)result["ResponseMessage"], "Ok");
                                        _Text_Enable = false;
                                        Franchise_Sell_Class_Data.Customer_Id = 0;
                                    }
                                }
                                else
                                {
                                    App.isBusy           = false;
                                    _Show_And_Hide_Stack = false;
                                    //_Get_Btn_Text = "Get";
                                    _Get_Btn_Text = "Cancel";
                                    _Text_Enable  = true;
                                    await App.Current.MainPage.DisplayAlert("Oops!", "Please Refresh Page And try Again....", "Ok");
                                }
                                Wait.Dispose();
                            }
                            else
                            {
                                //var fm = new FranchiseMaster();
                                //var page = (Page)Activator.CreateInstance(typeof(SellPage));
                                //page.Title = "Sell";
                                //fm.Detail = new NavigationPage(page)
                                //{
                                //    BarBackgroundColor = Color.Black,
                                //    BarTextColor = Color.White,
                                //};
                                //fm.IsPresented = false;
                                //await navigation.PushModalAsync(fm);
                                App.isBusy = false;
                                SellPage cp = new SellPage();
                                var      ChackPriousPage = navigation.NavigationStack.Where(x => x.Title == cp.Title).FirstOrDefault();

                                if (ChackPriousPage != null)
                                {
                                    await navigation.PopAsync();
                                }
                                await navigation.PushAsync(new SellPage());

                                // null List
                            }
                        }
                        else
                        {
                            _Contect_No          = string.Empty;
                            _Show_And_Hide_Stack = false;
                            _Get_Btn_Text        = "Get";
                            _Text_Enable         = true;
                        }
                    }
                }
                catch (Exception ee)
                {
                    App.isBusy = false;
                    await App.Current.MainPage.DisplayAlert("Error", ee.Message, "Ok");
                }
            }
        }
示例#7
0
        private void backbutton_Click(object sender, RoutedEventArgs e)
        {
            SellPage sp = new SellPage();

            this.NavigationService.Navigate(sp);
        }
示例#8
0
        private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            SellPage sell = new SellPage();

            frame.NavigationService.Navigate(sell);
        }