Exemplo n.º 1
0
        public void foo()
        {
            string XlsPath = @"C:\Users\Bassam\Documents\Training\DataDriven\ExcelTestData\TcoData.xlsx";

            //int pax = 45;
            //Console.WriteLine(" pay :{0}", CalculateCalimityFund(pax));

            var res = ExcelReaderHelper.GetCelldata(XlsPath, "DocketsNumber", 0, 0).ToString();

            Console.WriteLine("res is {0}", res);
        }
Exemplo n.º 2
0
        public static void LoginFromExcelFile()
        {
            string FilePath = @"E:\Users\Bassam\Documents\Training\DataDriven\ExcelTestData\TcoData.xlsx";

            NavigateToUrl(ObjectRepository.Config.GetWebSite());
            DropDownListHelper.SelectElementByText(By.Id("cmbCompanies"), "Vered Hasharon");
            PomLogin TcoLogin = new PomLogin(ObjectRepository.Driver);

            TcoLogin.Login(ExcelReaderHelper.GetCelldata(FilePath, "Login", 1, 0).ToString(), ExcelReaderHelper.GetCelldata(FilePath, "Login", 1, 1).ToString());
            Thread.Sleep(2000);
        }
Exemplo n.º 3
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());
        }