示例#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  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);
        }
示例#3
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();
 }
示例#4
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");
        }