Ejemplo n.º 1
0
        public void CreateLease()
        {
            //---------------------------------------------------------------
            IWebDriver driver = new ChromeDriver();

            driver.Url = "https://dev-manage.liveuptop.com";
            driver.Manage().Window.Maximize();

            var loginPagePO = new LoginPagePO();

            PageFactory.InitElements(driver, loginPagePO);
            var topNavigationPO = new TopNavigationPO();

            PageFactory.InitElements(driver, topNavigationPO);
            var portfolioPO = new PortfolioPagePO();

            PageFactory.InitElements(driver, portfolioPO);

            var commonPageFunctions = new CommonPageFunctions();

            PageFactory.InitElements(driver, commonPageFunctions);

            var tenantChargesPO = new TenantChargesPO();

            PageFactory.InitElements(driver, tenantChargesPO);

            var contactsPO = new ContactsPO();

            PageFactory.InitElements(driver, contactsPO);

            var createLeasePO = new CreateLeasePO();

            PageFactory.InitElements(driver, createLeasePO);

            //driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            //-------------------------------------------------------------------------------------------------------

            //Enter Username
            loginPagePO.UserName.SendKeys("*****@*****.**");
            //Enter Password
            loginPagePO.Password.SendKeys("Testing1!");
            //Click on Submit Button
            loginPagePO.Submit.Click();

            //-------------------------------------------------------------------------------------------------------

            System.Threading.Thread.Sleep(2000);
            topNavigationPO.Tenants.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.CreateLeaseButton.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.SelectUnitButton.Click();
            createLeasePO.SelectUnitEditBox.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.SelectUnitEditBox.SendKeys(Keys.NumberPad3);
            createLeasePO.SelectUnitEditBox.SendKeys(Keys.NumberPad3);
            createLeasePO.SelectUnitEditBox.SendKeys(Keys.NumberPad2);
            System.Threading.Thread.Sleep(2000);
            createLeasePO.SelectUnitEditBox.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.ClickOnFourthAddress.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.AddTenantGuarantorBtn.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.EnterTenantGuarantorEmail.SendKeys("fashim+70");
            System.Threading.Thread.Sleep(4000);
            createLeasePO.ClickFirstEmail.Click();
            System.Threading.Thread.Sleep(2000);

            createLeasePO.StartDateEditbox.SendKeys("06/20/2019");
            commonPageFunctions.EnterPress(createLeasePO.StartDateEditbox);
            createLeasePO.EndDateEditbox.SendKeys("06/20/2020");
            commonPageFunctions.EnterPress(createLeasePO.EndDateEditbox);
            createLeasePO.MoveInDateDateEditbox.SendKeys("06/20/2019");
            commonPageFunctions.EnterPress(createLeasePO.MoveInDateDateEditbox);
            System.Threading.Thread.Sleep(2000);
            createLeasePO.AutoApprovePaymentRadioButton.Click();
            createLeasePO.ContinueButton.Click();
            System.Threading.Thread.Sleep(2000);

            createLeasePO.MonthlyChargesClickToAddRow.Click();
            commonPageFunctions.selectFromDropdown(createLeasePO.MonthlyChargesSelectTenantCharge, 2);
            createLeasePO.MonthlyChargesDescription.SendKeys("This is a Test Description");
            createLeasePO.MonthlyChargesAmount.SendKeys("2123");

            createLeasePO.FirstMonthChargesClickToAddRow.Click();
            commonPageFunctions.selectFromDropdown(createLeasePO.FirstMonthChargesSelectTenantCharge, 2);
            createLeasePO.FirstMonthChargesDescription.SendKeys("This is a Test Description");
            createLeasePO.FirstMonthChargesAmount.SendKeys("200");
            createLeasePO.ContinueButton.Click();
            System.Threading.Thread.Sleep(5000);
            createLeasePO.ContinueButton.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.UploadManualLeaseRadioButton.Click();
            System.Threading.Thread.Sleep(1000);
            createLeasePO.ContinueButton.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.SendLeaseForSigningButton.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.ConfirmSendingLeaseButton.Click();
            System.Threading.Thread.Sleep(4000);
            createLeasePO.MoreButton.Click();
            System.Threading.Thread.Sleep(2000);
            createLeasePO.CancelLeaseButton.Click();
            System.Threading.Thread.Sleep(3000);
            createLeasePO.EffectiveDateEditBox.SendKeys("06/20/2019");
            commonPageFunctions.EnterPress(createLeasePO.EffectiveDateEditBox);
            createLeasePO.CancelLeaseConfirmButton.Click();
        }
        public void CreateMaintenanceRequest()
        {
            //---------------------------------------------------------------
            IWebDriver driver = new ChromeDriver();

            driver.Url = "https://dev-manage.liveuptop.com";
            driver.Manage().Window.Maximize();

            var loginPagePO = new LoginPagePO();

            PageFactory.InitElements(driver, loginPagePO);
            var topNavigationPO = new TopNavigationPO();

            PageFactory.InitElements(driver, topNavigationPO);
            var portfolioPO = new PortfolioPagePO();

            PageFactory.InitElements(driver, portfolioPO);

            var commonPageFunctions = new CommonPageFunctions();

            PageFactory.InitElements(driver, commonPageFunctions);

            var tenantChargesPO = new TenantChargesPO();

            PageFactory.InitElements(driver, tenantChargesPO);

            var contactsPO = new ContactsPO();

            PageFactory.InitElements(driver, contactsPO);


            //-------------------------------------------------------------------------------------------------------

            //Enter Username
            loginPagePO.UserName.SendKeys("*****@*****.**");
            //Enter Password
            loginPagePO.Password.SendKeys("Testing1!");
            //Click on Submit Button
            loginPagePO.Submit.Click();

            //-------------------------------------------------------------------------------------------------------


            System.Threading.Thread.Sleep(4000);
            // new Actions(driver).Click(topNavigationPO.GearIcon).Perform();
            topNavigationPO.GearIcon.Click();
            topNavigationPO.ContactDirectory.Click();
            System.Threading.Thread.Sleep(2000);

            commonPageFunctions.VerifyElementInTableExists(driver, contactsPO.ContactsListTable, "ABC Company");
            System.Threading.Thread.Sleep(2000);

            IJavaScriptExecutor js = (IJavaScriptExecutor)driver;

            js.ExecuteScript("window.scrollTo(document.body.scrollHeight,0)");

            contactsPO.AddRequestButton.Click();
            System.Threading.Thread.Sleep(2000);
            contactsPO.MaintRequestAddressTextbox.SendKeys("444");
            System.Threading.Thread.Sleep(2000);
            contactsPO.MaintRequestClickFirstAddress.Click();

            String Title = commonPageFunctions.randomCharactersGenerator();

            contactsPO.MaintRequestTitle.SendKeys(Title);
            commonPageFunctions.selectFromDropdown(contactsPO.MaintRequestCategories, 2);
            contactsPO.MaintRequestRadioUrgent.Click();

            contactsPO.MaintRequestDescription.Click();
            contactsPO.MaintRequestDescription.SendKeys("Test Description");
            contactsPO.MaintRequestAddRequestButton.Click();
            System.Threading.Thread.Sleep(2000);
            commonPageFunctions.VerifyElementInTableExists(driver, contactsPO.MaintRequestTable, Title);
            System.Threading.Thread.Sleep(2000);
            contactsPO.MaintRequestTitle.Clear();
            String TitleUpdated = commonPageFunctions.randomCharactersGenerator();

            contactsPO.MaintRequestTitle.SendKeys(TitleUpdated);
            contactsPO.MaintRequestAddRequestButton.Click();
            System.Threading.Thread.Sleep(2000);
            commonPageFunctions.VerifyElementExistsInTable(driver, contactsPO.MaintRequestTable, TitleUpdated);
        }
Ejemplo n.º 3
0
        public void CreateContact()
        {
            //---------------------------------------------------------------
            IWebDriver driver = new ChromeDriver();

            driver.Url = "https://dev-manage.liveuptop.com";
            driver.Manage().Window.Maximize();

            var loginPagePO = new LoginPagePO();

            PageFactory.InitElements(driver, loginPagePO);
            var topNavigationPO = new TopNavigationPO();

            PageFactory.InitElements(driver, topNavigationPO);
            var portfolioPO = new PortfolioPagePO();

            PageFactory.InitElements(driver, portfolioPO);

            var commonPageFunctions = new CommonPageFunctions();

            PageFactory.InitElements(driver, commonPageFunctions);

            var tenantChargesPO = new TenantChargesPO();

            PageFactory.InitElements(driver, tenantChargesPO);

            var contactsPO = new ContactsPO();

            PageFactory.InitElements(driver, contactsPO);


            //-------------------------------------------------------------------------------------------------------

            //Enter Username
            loginPagePO.UserName.SendKeys("*****@*****.**");
            //Enter Password
            loginPagePO.Password.SendKeys("Testing1!");
            //Click on Submit Button
            loginPagePO.Submit.Click();

            //-------------------------------------------------------------------------------------------------------


            System.Threading.Thread.Sleep(4000);
            // new Actions(driver).Click(topNavigationPO.GearIcon).Perform();
            topNavigationPO.GearIcon.Click();
            topNavigationPO.ContactDirectory.Click();
            System.Threading.Thread.Sleep(2000);
            contactsPO.AddContact.Click();
            String companyName = commonPageFunctions.randomCharactersGenerator();

            System.Threading.Thread.Sleep(2000);
            contactsPO.AddContactCompanyName.SendKeys(companyName);
            contactsPO.AddContactContinueButton.Click();
            System.Threading.Thread.Sleep(2000);

            commonPageFunctions.VerifyElementInTableExists(driver, contactsPO.ContactsListTable, companyName);

            System.Threading.Thread.Sleep(2000);

            IJavaScriptExecutor js = (IJavaScriptExecutor)driver;

            js.ExecuteScript("window.scrollTo(document.body.scrollHeight,0)");

            contactsPO.UpdateContactButton.Click();
            System.Threading.Thread.Sleep(2000);
            contactsPO.AddContactCompanyName.Clear();

            String randomValueUpdate = commonPageFunctions.randomCharGenerator();

            contactsPO.AddContactCompanyName.SendKeys(randomValueUpdate);
            contactsPO.SaveContactsButton.Click();
            System.Threading.Thread.Sleep(2000);
            String verifyContact = contactsPO.VerifyContactUpdated.Text;

            if (verifyContact.Contains(randomValueUpdate))
            {
                Console.WriteLine("Actual " + verifyContact);
                Console.WriteLine("Expected " + randomValueUpdate);
                Console.WriteLine("Update Successful");
            }
            else
            {
                Console.WriteLine("Update Failed");
            }
            System.Threading.Thread.Sleep(2000);
            contactsPO.DeleteContactsButton.Click();
        }
Ejemplo n.º 4
0
        public void CreateJournalEntry()
        {
            //---------------------------------------------------------------
            IWebDriver driver = new ChromeDriver();

            driver.Url = "https://dev-manage.liveuptop.com";
            // driver.Url = "https://stage-manage.liveuptop.com";
            driver.Manage().Window.Maximize();

            var loginPagePO = new LoginPagePO();

            PageFactory.InitElements(driver, loginPagePO);
            var topNavigationPO = new TopNavigationPO();

            PageFactory.InitElements(driver, topNavigationPO);
            var portfolioPO = new PortfolioPagePO();

            PageFactory.InitElements(driver, portfolioPO);

            var commonPageFunctions = new CommonPageFunctions();

            PageFactory.InitElements(driver, commonPageFunctions);

            var tenantChargesPO = new TenantChargesPO();

            PageFactory.InitElements(driver, tenantChargesPO);

            var contactsPO = new ContactsPO();

            PageFactory.InitElements(driver, contactsPO);


            //-------------------------------------------------------------------------------------------------------

            //Enter Username
            //loginPagePO.UserName.SendKeys("*****@*****.**");
            loginPagePO.UserName.SendKeys("*****@*****.**");
            //Enter Password
            loginPagePO.Password.SendKeys("Testing1!");
            //Click on Submit Button
            loginPagePO.Submit.Click();

            //-------------------------------------------------------------------------------------------------------


            System.Threading.Thread.Sleep(4000);
            // new Actions(driver).Click(topNavigationPO.GearIcon).Perform();
            topNavigationPO.GearIcon.Click();
            topNavigationPO.ContactDirectory.Click();
            System.Threading.Thread.Sleep(2000);
            contactsPO.AddContact.Click();
            String companyName = commonPageFunctions.randomCharactersGenerator();

            System.Threading.Thread.Sleep(2000);
            contactsPO.AddContactCompanyName.SendKeys(companyName);
            contactsPO.AddContactContinueButton.Click();
            System.Threading.Thread.Sleep(2000);

            commonPageFunctions.VerifyElementInTableExists(driver, contactsPO.ContactsListTable, companyName);

            //driver.FindElement(By.XPath("//*[contains(text(),'74zzR8ul')]")).Click();
            System.Threading.Thread.Sleep(2000);

            IJavaScriptExecutor js = (IJavaScriptExecutor)driver;

            js.ExecuteScript("window.scrollTo(document.body.scrollHeight,0)");

            contactsPO.AddTransactionButton.Click();
            contactsPO.AddJournalEntryButton.Click();
            System.Threading.Thread.Sleep(2000);
            contactsPO.selectOrgEntityProp.Click();
            contactsPO.selectFirstFromOrgEntityProp.Click();
            System.Threading.Thread.Sleep(2000);
            contactsPO.DateEditbox.SendKeys("06/20/2019");
            commonPageFunctions.EnterPress(contactsPO.DateEditbox);

            contactsPO.ClickToAddRow.Click();

            commonPageFunctions.selectFromDropdown(contactsPO.SelectJournalEntryAccount, 1);
            contactsPO.DescriptionTextbox.SendKeys("Description Test");
            System.Threading.Thread.Sleep(2000);
            String DebitCreditAmount = commonPageFunctions.randomNumGenConvertToString();

            contactsPO.AddJEDebitR1.SendKeys(DebitCreditAmount);

            contactsPO.ClickToAddSecondRow.Click();
            commonPageFunctions.selectFromDropdown(contactsPO.SelectJournalEntryAccountR2, 3);
            contactsPO.AddJECreditR2.SendKeys(DebitCreditAmount);
            System.Threading.Thread.Sleep(2000);

            //String retrievedExpenseAmount = contactsPO.retrievedInvoiceAmount.Text;

            contactsPO.SaveTransactionButton.Click();
            System.Threading.Thread.Sleep(2000);

            //commonPageFunctions.VerifyElementInTableExists(driver, contactsPO.TransactionTable, retrievedExpenseAmount);
            contactsPO.TransactionClickFirstRow.Click();
            System.Threading.Thread.Sleep(4000);

            contactsPO.AddJEDebitR1.Clear();
            String DebitCreditAmountUpdate = commonPageFunctions.randomNumGenConvertToString();

            contactsPO.AddJEDebitR1.SendKeys(DebitCreditAmountUpdate);

            contactsPO.AddJECreditR2.Clear();
            contactsPO.AddJECreditR2.SendKeys(DebitCreditAmountUpdate);
            System.Threading.Thread.Sleep(2000);

            contactsPO.UpdateJournalEntryButton.Click();
            System.Threading.Thread.Sleep(2000);
            //commonPageFunctions.VerifyElementInTableExists(driver, contactsPO.TransactionTable, retrievedExpenseAmountUpdated);
            contactsPO.TransactionClickFirstRow.Click();
            System.Threading.Thread.Sleep(3000);
            contactsPO.ModalMoreButton.Click();
            contactsPO.ModalDeleteButton.Click();
            System.Threading.Thread.Sleep(2000);
            contactsPO.ModalDeleteConfirmButton.Click();
            System.Threading.Thread.Sleep(2000);
            contactsPO.DeleteContactsButton.Click();
        }
        public void CreateNotes()
        {
            //---------------------------------------------------------------
            IWebDriver driver = new ChromeDriver();

            driver.Url = "https://dev-manage.liveuptop.com";
            driver.Manage().Window.Maximize();

            var loginPagePO = new LoginPagePO();

            PageFactory.InitElements(driver, loginPagePO);
            var topNavigationPO = new TopNavigationPO();

            PageFactory.InitElements(driver, topNavigationPO);
            var portfolioPO = new PortfolioPagePO();

            PageFactory.InitElements(driver, portfolioPO);

            var commonPageFunctions = new CommonPageFunctions();

            PageFactory.InitElements(driver, commonPageFunctions);

            var tenantChargesPO = new TenantChargesPO();

            PageFactory.InitElements(driver, tenantChargesPO);

            var contactsPO = new ContactsPO();

            PageFactory.InitElements(driver, contactsPO);

            //driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);

            //-------------------------------------------------------------------------------------------------------

            //Enter Username
            loginPagePO.UserName.SendKeys("*****@*****.**");
            //Enter Password
            loginPagePO.Password.SendKeys("Testing1!");
            //Click on Submit Button
            loginPagePO.Submit.Click();

            //-------------------------------------------------------------------------------------------------------

            System.Threading.Thread.Sleep(4000);
            // new Actions(driver).Click(topNavigationPO.GearIcon).Perform();
            topNavigationPO.GearIcon.Click();
            topNavigationPO.ContactDirectory.Click();
            System.Threading.Thread.Sleep(2000);

            commonPageFunctions.VerifyElementInTableExists(driver, contactsPO.ContactsListTable, "ABC Company");
            System.Threading.Thread.Sleep(2000);

            IJavaScriptExecutor js = (IJavaScriptExecutor)driver;

            js.ExecuteScript("window.scrollTo(document.body.scrollHeight,0)");

            contactsPO.AddNoteButton.Click();
            System.Threading.Thread.Sleep(2000);
            String NoteTitle = commonPageFunctions.randomCharactersGenerator();

            contactsPO.NoteTitleEditBox.SendKeys(NoteTitle);
            String NoteBody = commonPageFunctions.randomCharactersGenerator();

            contactsPO.NoteBodyTextArea.SendKeys(NoteBody);
            contactsPO.SaveNoteModalButton.Click();
            System.Threading.Thread.Sleep(2000);
            commonPageFunctions.VerifyElementInTableExists(driver, contactsPO.NotesTable, NoteTitle);
            System.Threading.Thread.Sleep(4000);
            String NoteTitleUpdated = commonPageFunctions.randomCharactersGenerator();

            contactsPO.NoteTitleEditBox.Clear();
            contactsPO.NoteTitleEditBox.SendKeys(NoteTitleUpdated);
            String NoteBodyUpdated = commonPageFunctions.randomCharactersGenerator();

            contactsPO.NoteBodyTextArea.Clear();
            contactsPO.NoteBodyTextArea.SendKeys(NoteBodyUpdated);
            contactsPO.SaveNoteButton.Click();
            System.Threading.Thread.Sleep(2000);
            commonPageFunctions.VerifyElementInTableExists(driver, contactsPO.NotesTable, NoteTitleUpdated);
            System.Threading.Thread.Sleep(2000);
            contactsPO.DeleteNoteButton.Click();
        }