/// <summary>
        /// TypeCostCenterNumber method enters cost center number in cost center number field
        /// </summary>
        /// <param name="driver"></param>
        /// <param name="reporter"></param>
        /// <param name="costCenterNumber">Store Number</param>
        public static void TypeCostCenterNumber(RemoteWebDriver driver, Iteration reporter,
                                                string costCenterNumber)
        {
            reporter.Add(new Act("Enter cost center number in cost center number field"));
            Selenide.SwitchToFrame(driver, Locator.Get(LocatorType.ID, "iFrameSiteContents"));
            if (costCenterNumber.Equals(""))
            {
                return;
            }
            else if (Selenide.IsElementExists(driver, Util.GetLocator("CostCenterNumber1_txt")))
            {
                Selenide.Clear(driver, Util.GetLocator("CostCenterNumber1_txt"), Selenide.ControlType.Textbox);
                Selenide.SetText(driver, Util.GetLocator("CostCenterNumber1_txt"), Selenide.ControlType.Textbox, costCenterNumber);
            }

            //Selenide.SwitchToDefaultContent(driver);
        }
Exemplo n.º 2
0
 /// <summary>
 /// ClearSearchText method clear text box
 /// </summary>
 /// <param name="driver"></param>
 /// <param name="reporter"></param>
 public static void ClearSearchText(RemoteWebDriver driver, Iteration reporter)
 {
     Selenide.Clear(driver, Util.GetLocator("search_txt"), Selenide.ControlType.Textbox);
 }