Пример #1
0
 public static void LoginFromConfigFile()
 {
     NavigateToUrl(ObjectRepository.Config.GetWebSite());
     DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon");
     LoginPagePOM    veredLog    = new LoginPagePOM(ObjectRepository.Driver);
     WelcomToTcoPage veredWelcom = veredLog.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword());
 }
Пример #2
0
        public void GivenTheLoginFormContainsInvalidEmailAndInvalidPassword()
        {
            var loginPage = new LoginPagePOM(_driver);

            loginPage.GoToPage();
            loginPage.PopulateLoginForm(Constants.EmailInValid, Constants.PasswordInvalid);
        }
Пример #3
0
        public void  OpenTheQuoteByIdAndReachTheQuotationPage()
        {
            NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebSite());
            DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon");
            LoginPagePOM    veredLog    = new LoginPagePOM(ObjectRepository.Driver);
            WelcomToTcoPage veredWelcom = veredLog.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword());
            QuotationsList  verdquote   = veredWelcom.ClickIncoming();

            //  var mainWindow = BrowserHelper.GettheParentPage();

            verdquote.ticTcheckBoxAll();
            verdquote.clickShowButton();

            // make sure that you are in the right page -->assert the title of the page

            Assert.AreEqual("QUOTATION / GROUPS LIST", verdquote.PageTitle, "the titles are not equals");
            var HoverAnElement = ObjectRepository.Driver.FindElement(By.XPath("//td[@id='ctl00_ContentPlaceHolder1_mnuTopn0']//a[contains(text(),'Sheets')]"));
            var ElementClick   = ObjectRepository.Driver.FindElement(By.XPath("//a[contains(text(),'Open Calc.sheet/Group by number')]"));

            MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, HoverAnElement, ElementClick);

            //switch to the new frame by invoking   OpenExistingQuote Method
            GenericHelper.OpenExistingQuote(TestContext.DataRow["QuotationId"].ToString());
            Thread.Sleep(2000);
            //switch to the new window
            BrowserHelper.SwitchToWindow(1);
        }
        public void GivenTheIAmOnTheHomepage()
        {
            var loginPage = new LoginPagePOM(_driver);

            loginPage.GoToPage();
            loginPage.PopulateLoginForm(Constants.EmailValid, Constants.PasswordValid);
            loginPage.LoginSubmitBtn().Click();
        }
Пример #5
0
 public static void Test_LoggInVeredHasharon()
 {
     NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebSite());
     DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon");
     LoginPagePOM    veredLog    = new LoginPagePOM(ObjectRepository.Driver);
     WelcomToTcoPage veredWelcom = veredLog.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword());
     QuotationsList  verdquote   = veredWelcom.ClickIncoming();
 }
Пример #6
0
        public void Test_GetUserNameInValid()
        {
            NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebSite());
            DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon");
            LoginPagePOM    Login      = new LoginPagePOM(ObjectRepository.Driver);
            WelcomToTcoPage verdWelcom = Login.ClickLogin(ObjectRepository.Config.GetVeredUser(), ObjectRepository.Config.GetVeredPassword());
            var             UserName   = verdWelcom.GetUserName();

            Assert.AreEqual("Vered Hasharon 2", UserName, "the user names are not equals");
        }
Пример #7
0
        public static void SelectIncoming()
        {
            LoginFromConfigFile();
            LoginPagePOM   LogMe     = new LoginPagePOM(ObjectRepository.Driver);
            QuotationsList quoteList = LogMe.WelcomToTco.ClickIncoming();

            //Assert that you are in the right page
            Assert.AreEqual("QUOTATION / GROUPS LIST", quoteList.PageTitle, "the titles are not equals");
            var HoverAnElement = ObjectRepository.Driver.FindElement(By.XPath("//td[@id='ctl00_ContentPlaceHolder1_mnuTopn0']//a[contains(text(),'Sheets')]"));
            var ElementClick   = ObjectRepository.Driver.FindElement(By.XPath("//a[contains(text(),'New Calc.sheet')]"));

            MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, HoverAnElement, ElementClick);
        }
Пример #8
0
        public static void SelectIncomingToursAndOpenById()
        {
            LoginFromConfigFile();
            LoginPagePOM   LogMe     = new LoginPagePOM(ObjectRepository.Driver);
            QuotationsList quoteList = LogMe.WelcomToTco.ClickIncoming();
            string         FilePath  = @"E:\Users\Bassam\Documents\Training\DataDriven\ExcelTestData\TcoData.xlsx";

            //Assert that you are in the right page
            Assert.AreEqual("QUOTATION / GROUPS LIST", quoteList.PageTitle, "the titles are not equals");
            var HoverAnElement = ObjectRepository.Driver.FindElement(By.XPath("//td[@id='ctl00_ContentPlaceHolder1_mnuTopn0']//a[contains(text(),'Sheets')]"));
            var ElementClick   = ObjectRepository.Driver.FindElement(By.XPath("//a[contains(text(),'Open Calc.sheet/Group by number')]"));

            MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, HoverAnElement, ElementClick);

            //switch to the new frame by invoking   OpenExistingQuote Method
            GenericHelper.OpenExistingQuote(ExcelReaderHelper.GetCelldata(FilePath, "Quotations", 1, 0).ToString());
        }
Пример #9
0
        public void ThenAValidationMessageIsDisplayed(string expectedMessage)
        {
            var loginPage = new LoginPagePOM(_driver);

            loginPage.ValidationContent().Text.Should().Be(expectedMessage);
        }
Пример #10
0
        public void WhenISubmitTheLoginForm()
        {
            var loginPage = new LoginPagePOM(_driver);

            loginPage.LoginSubmitBtn().Click();
        }
Пример #11
0
 public static void SelectClerkMenu()
 {
     LoginFromConfigFile();
     var logMe = new LoginPagePOM(ObjectRepository.Driver);
 }