public void WhenUserClicksOnAnyOfTheAccountListed()
        {
            try
            {
                List <IWebElement> rows = new List <IWebElement>(AccountsPage.TableElement(SelectBrowser.driver).FindElements(By.TagName("tr")));
                rowscount = rows.Count;

                List <IWebElement> columns = new List <IWebElement>(SelectBrowser.driver.FindElements(By.XPath("//table[@id='accounts-jeopardy']//tbody//tr[1]/td")));
                colcount = columns.Count;

                for (int rownum = 1; rownum <= rowscount - 2; rownum++)
                {
                    List <IWebElement> rowCells = new List <IWebElement>(SelectBrowser.driver.FindElements(By.XPath("//table[@id='accounts-jeopardy']//tbody//tr[" + rownum + "]/td")));
                    for (int CellNumber = 0; CellNumber < rowCells.Count; CellNumber++)
                    {
                        string      text        = rowCells.ElementAt(CellNumber).Text;
                        IWebElement element     = rowCells.ElementAt(CellNumber).FindElement(By.TagName("a"));
                        string      textpresent = element.Text;
                        if (textpresent.Contains(ExcelRead.GetCellData(xlpath1, @"AccountsSheet", 1, 0)))
                        {
                            Synchronization.VisibleElement(SelectBrowser.driver, By.TagName("a"));
                            element.Click();
                            test.Log(Status.Pass, "Clicked on the Account==>" + ExcelRead.GetCellData(xlpath1, @"AccountsSheet", 1, 0));
                            break;
                        }
                    }
                    break;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception==>" + ex);
                ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png);
            }
        }
Example #2
0
        public void User_Can_Remove_Buttons_from_Accounts_tab()
        {
            AccountsPage.GoTo();
            AccountPage.RemoveButtons();

            Assert.IsTrue(AccountPage.ButtonsRemoved(), "Removal of one of the Text Message buttons failed.");
            AccountPage.ReturnToHomePage();
        }
Example #3
0
        public void test2()
        {
            //Browser browser = new Browser(driver, "CHROME");
            IWebDriver driver = new FirefoxDriver();

            driver.Url = "http://automationpractice.com/index.php";
            HomePage     homepage = new HomePage(driver);
            LoginPage    lp       = homepage.click_sign_in_link();
            AccountsPage ap       = lp.validSignIn();

            ap.verifyPageTitle();
            driver.Quit();
        }
 public void ThenUserShouldBeLandedSuccessfullyForJeopardyAccountsPage()
 {
     try
     {
         Synchronization.VisibleElement(SelectBrowser.driver, By.XPath("//h3[contains(text(),'Jeopardy Accounts')]"));
         Assert.IsTrue(AccountsPage.AccountsText(SelectBrowser.driver).Text.Contains("Jeopardy Accounts"));
         test.Log(Status.Info, "User Landed Successfully to the Jeopardy Account");
     }
     catch (Exception ex)
     {
         Console.WriteLine("Exception==>" + ex);
         ScreenshotPage.TakesScreenshotWithDate(@"Screesnhot", System.Drawing.Imaging.ImageFormat.Png);
     }
 }
        public void LoadCogsCalculation()
        {
            string       customerId = load.OptiCustomerId;
            string       carrierId  = load.OptiCarrierId;
            string       uniqueName = "qa" + DateTime.Now.ToString("yyyyMMddHHmmssfff");
            AccountsPage optimizerAccountsPageElements = new AccountsPage()
                                                         .SyncCustomerWithTlrg(customerId);
            SettingsPage settingsPage = new SettingsPage()
                                        .ClickCustomerSettingsGeneralLink()
                                        //.SearchAndSelectCustomer(customerId)
                                        //.SetCustomerGeneralFields("2", "125", "1", uniqueName + "@echo.com", "(GMT -6:00) Central Time (US & Canada), Mexico City")
                                        //.ClickSaveButton()
                                        //.WaitForSaveConfirmation()
                                        .SyncNewCarrier(carrierId);
            PricingUploadPage pricingUploadPage = new PricingUploadPage()
                                                  .UploadLineHaulMultiRates(customerId, carrierId, uniqueName)
                                                  .UploadFuelSchedule(customerId, carrierId)
                                                  .UploadSpecialServices(customerId, carrierId);

            CreateMultiStopLoadShipmentBuilder();
            string expectedLoadId = loadDetailsPage.GetLoadIdDisplayed();

            loadDetailsPage.ClickElement(loadDetailsPage.StartTlrgButton);
            string actualWarning   = driver.FindElementBy(loadDetailsPage.LoadWarning).Text;
            string expectedWarning = "You are currently viewing a READ ONLY version of this page. No changes are allowed.";
            string expectedStatus  = "In Progress";

            Assert.AreEqual(expectedWarning, actualWarning);
            HomePage homePage     = new HomePage();
            string   expectedCogs = homePage.GetLoadCogs(expectedLoadId, 0.01, 100.00, 215.00, 0.3, 1000.00);

            homePage.ClickAllTab()
            .WaitForStartTlrgLoad(expectedLoadId, customerId, expectedStatus)
            .SearchAndSelectCustomer(customerId)
            .FilterLoads(homePage.LoadIdField, expectedLoadId);
            IList <string> actualLoad   = homePage.GetLoadAtIndex(0);
            string         actualLoadId = actualLoad[0];
            string         actualCogs   = actualLoad[3];
            string         actualStatus = actualLoad[4];

            Assert.AreEqual(expectedLoadId, actualLoadId);
            Assert.AreEqual(expectedCogs, actualCogs);
            Assert.AreEqual(expectedStatus, actualStatus);
        }
 public void WhenClickOnOneSpecialtyProviderPlan()
 {
     AccountsPage.Click_on_Specialty_plan();
 }
 public void WhenClickOnParentAccountsPlan()
 {
     AccountsPage.Click_on_Parents_Accounts_plan();
 }
Example #8
0
        public static void AddAccount()
        {
            AccountsPage ap = new AccountsPage();

            ap.AddAccount.Click();
        }
 public void WhenClickOnOneStateMedicaidPlan()
 {
     AccountsPage.Click_on_State_Medicaid_plan();
 }
 public void ThenSelectAView()
 {
     Accounts.Click_on_commercial_view();
     AccountsPage.Click_on_commercial_plan();
 }
 public void ThenSelectCommercialView()
 {
     DriverContext.Driver.SwitchTo().Frame("itarget");
     Accounts.Click_on_commercial_view();
     AccountsPage.Click_on_commercial_plan();
 }
 public void WhenClickOnOnePBMPlan()
 {
     AccountsPage.Click_on_PBM_plan();
 }
 public void WhenClickOnOneCommercialPlan()
 {
     AccountsPage.Click_on_commercial_plan();
 }
 public void ThenUserClicksOnMyAccounts()
 {
     AccountsPage.AcntPage();
 }
 public void WhenClickOnMyAccountsPlan()
 {
     AccountsPage.Click_on_My_Accounts_plan();
 }
 public void WhenClickOnMedicarePlan()
 {
     AccountsPage.Click_on_Medicare_plan();
 }
 public void WhenClickOnOneVAPlan()
 {
     AccountsPage.Click_on_VA_plan();
 }
 public void WhenClickOnOneTricarePlan()
 {
     AccountsPage.Click_on_Tricare_plan();
 }
 public void ThenCheckTheViewDropDownValuesAgainstRequirement()
 {
     AccountsPage.VerifyViewDropdown();
 }
 public void WhenClickOnOneEmployerPlan()
 {
     AccountsPage.Click_on_Employer_plan();
 }