Ejemplo n.º 1
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 OpenFirstDocketFromGrid()
        {
            IsropaLogin.Login();
            SelectClerkMenuFromMainPage.SelectClerkMenu();

            //Double click the docket to open it
            var element = GenericHelper.WaitForElementAndGetIt(ObjectRepository.Driver, By.XPath("//table[@id='ctl00_ContentPlaceHolder1_productGridView']/descendant::tr[2]"));

            MouseActionsHelper.DoubleClick(element);
            BrowserHelper.SwitchToWindow(1);

            //locate the service table and pull all the services
            var ServicesList = ObjectRepository.Driver.FindElements(By.Id("ctl00_ContentPlaceHolder1_productGridView"));

            foreach (var item in ServicesList)
            {
                Console.WriteLine(item.Text);
            }

            //locate the first service and perform a right click on it
            var Service = GenericHelper.WaitForElementAndGetIt(ObjectRepository.Driver, By.XPath("//table[@id='ctl00_ContentPlaceHolder1_productGridView']/descendant::tr[2]"));

            MouseActionsHelper.RightClick(Service);
            Thread.Sleep(3000);
        }
Ejemplo n.º 3
0
        private void AddGroupMembers()
        {
            QuotationSheet myQuote = new QuotationSheet(ObjectRepository.Driver);
            var            AddMem  = myQuote.QuotationSheetTabs.AddGroupMember;

            MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, myQuote.QuotationSheetTabs.Tab_Clients, myQuote.QuotationSheetTabs.AddGroupMember);
        }
Ejemplo n.º 4
0
        private void FillTheControlFromExcelFile()
        {
            quote.QutationMainDetails.Txt_GroupName.SendKeys(TestContext.DataRow["GroupName"].ToString());
            quote.QutationMainDetails.DatePicker_FromDate.SendKeys(TestContext.DataRow["From"].ToString());
            MouseActionsHelper.DELETE_Click(quote.QutationMainDetails.DatePicker_ToDate);
            quote.QutationMainDetails.DatePicker_ToDate.SendKeys(TestContext.DataRow["To"].ToString());

            //Countries
            quote.QutationMainDetails.Combo_Country.Click();
            quote.QutationMainDetails.Combo_Country.SendKeys(TestContext.DataRow["Country"].ToString());
            MouseActionsHelper.ClickEnter(quote.QutationMainDetails.Combo_Country);

            //Agent
            Thread.Sleep(500);
            GenericHelper.WaitForElementAndGetIt(ObjectRepository.Driver, By.Id("ctl00_ContentPlaceHolder1_chkAllCustomer"));
            quote.QutationMainDetails.AllAgentChkBox.Click();
            Thread.Sleep(500);
            GenericHelper.WaitForElementToBeClickAbleAndGetIt(ObjectRepository.Driver, By.Id("ctl00_ContentPlaceHolder1_cmbCustomer_Arrow"));
            quote.QutationMainDetails.Combo_AgentArrow.Click();
            Thread.Sleep(500);
            GenericHelper.WaitForElementAndGetIt(ObjectRepository.Driver, By.Id("ctl00_ContentPlaceHolder1_cmbCustomer_Input"));
            MouseActionsHelper.DELETE_Click(quote.QutationMainDetails.Combo_Agent);
            quote.QutationMainDetails.Combo_Agent.SendKeys(TestContext.DataRow["Agents"].ToString());
            MouseActionsHelper.ClickEnter(quote.QutationMainDetails.Combo_Agent);

            //LANGUAGE
            Thread.Sleep(500);
            MouseActionsHelper.DELETE_Click(quote.QutationMainDetails.Combo_Language);
            quote.QutationMainDetails.Combo_Language.SendKeys(TestContext.DataRow["Languages"].ToString());
            MouseActionsHelper.ClickEnter(quote.QutationMainDetails.Combo_Language);

            //H.Std
            Thread.Sleep(500);
            quote.QutationMainDetails.Combo_HotelStandardArrow.Click();
            quote.QutationMainDetails.Combo_HotelStandard.SendKeys(TestContext.DataRow["HotelStd"].ToString());
            quote.QutationMainDetails.Combo_HotelStandardArrow.Click();

            //Adults
            quote.QutationMainDetails.Txt_AdultNumber.SendKeys(TestContext.DataRow["Adults"].ToString());

            //children
            quote.QutationMainDetails.Txt_ChildrenNumber.SendKeys(TestContext.DataRow["Children"].ToString());

            //Tour Leader
            quote.QuotationExtraDetails.Txt_TourLeader.SendKeys(TestContext.DataRow["TourLeader"].ToString());

            //Arrival
            quote.QuotationExtraDetails.Txt_ArrivalFlightBorder.SendKeys(TestContext.DataRow["Arrival"].ToString());

            //Flight Boarder
            quote.QuotationExtraDetails.Txt_ArrivalFlightBorder.SendKeys(TestContext.DataRow["FlightBoarder"].ToString());

            //Remarks
            quote.QuotationExtraDetails.TxtArea_Remarks.SendKeys(TestContext.DataRow["Remarks"].ToString());

            //click Add New Quote
            quote.QuotationActionButton.Btn_AddNewQuote.Click();
            Thread.Sleep(3000);
        }
Ejemplo n.º 5
0
        private void ActionsOntheQuotePage()
        {
            QuotationSheet Quote    = new QuotationSheet(ObjectRepository.Driver);
            var            element1 = Quote.TopMenu.DataEntry;
            var            element2 = Quote.TopMenu.ParkingFees;

            MouseActionsHelper.hoverAnElement(element1);

            Thread.Sleep(1500);
            MouseActionsHelper.HoverAndClick(ObjectRepository.Driver, element1, element2);
            Thread.Sleep(2000);
        }
Ejemplo n.º 6
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);
        }
Ejemplo n.º 7
0
        public void getAllElements()
        {
            IsropaLogin.Login();
            SelectClerkMenuFromMainPage.SelectClerkMenu();

            var element = GenericHelper.WaitForElementAndGetIt(ObjectRepository.Driver, By.XPath("//table[@id='ctl00_ContentPlaceHolder1_productGridView']/descendant::tr[2]"));

            MouseActionsHelper.DoubleClick(element);
            Thread.Sleep(3000);


            //locate the table element
            IWebElement docketTable = ObjectRepository.Driver.FindElement(By.XPath("//table[@id='ctl00_ContentPlaceHolder1_productGridView']/child::tbody"));

            //locate the rows in the original table docketTable
            List <IWebElement> tableRows = new List <IWebElement>(docketTable.FindElements(By.TagName("tr")));

            Console.WriteLine("current table has .{0}", tableRows.Count);

            foreach (var colElement in tableRows)
            {
                //Getting Number of cols in row table

                IList <IWebElement> cols = new List <IWebElement>(colElement.FindElements(By.TagName("td")));

                if (cols.Count > 0)
                {
                    //Iterating through each cell

                    foreach (var cellData in cols)
                    {
                        //getting each cell data


                        if (cellData.Text == "CALF")
                        {
                            ServiceAbbr.Add(cellData);
                        }
                        //Console.WriteLine("Cell No " + data);
                    }
                }
            }
            Console.WriteLine("ServiceAbbr count Is.{0}", ServiceAbbr.Count);



            //   List<IWebElement>  CellsList = new List<IWebElement>(docketTable.FindElements(By.TagName("td")));

            //List<IWebElement> templist = new List<IWebElement>(tableRows[0].FindElements(By.TagName("td")));
        }
Ejemplo n.º 8
0
        public void SelectTheFirstDocktOfToday()
        {
            NazOpenFilesToday();
            //Actions act = new Actions(ObjectRepository.Driver);
            var elem = ObjectRepository.Driver.FindElement(By.XPath("//table[@id='ctl00_ContentPlaceHolder1_productGridView']/descendant::td[1]"));

            //  act.DoubleClick(elem);
            //  act.Build();
            //  act.Perform();

            MouseActionsHelper.DoubleClick(elem);



            Thread.Sleep(10000);
        }
Ejemplo n.º 9
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());
        }
        public void SelectFirstDocket()
        {
            IsropaLogin.Login();
            SelectClerkMenuFromMainPage.SelectClerkMenu();

            var element = GenericHelper.WaitForElementAndGetIt(ObjectRepository.Driver, By.XPath("//table[@id='ctl00_ContentPlaceHolder1_productGridView']/descendant::tr[2]"));

            MouseActionsHelper.DoubleClick(element);
            Thread.Sleep(3000);

            //select all the docket services
            var ServicesList = ObjectRepository.Driver.FindElements(By.XPath("//table[@id='ctl00_ContentPlaceHolder1_productGridView']"));

            foreach (var item in ServicesList)
            {
                Console.WriteLine();
            }
        }
Ejemplo n.º 11
0
 public void QuotationPrint()
 {
     MouseActionsHelper.HoverAndClick(Driver, Printing, PrintQuotation);
 }
Ejemplo n.º 12
0
 public void TransferPrint()
 {
     MouseActionsHelper.HoverAndClick(Driver, Printing, PrintItinerary);
 }
Ejemplo n.º 13
0
 public void CouponPrint()
 {
     MouseActionsHelper.HoverAndClick(Driver, Printing, PrintCoupon);
 }