/// <summary>
 /// Method used to click on WebElement
 /// </summary>
 /// <param name="byObj">By object</param>
 public void Click(By bBy)
 {
     WaitAndGetElement(bBy);
     try
     {
         _iWebElement.Click();
     }catch (StaleElementReferenceException)
     {
         _iDriver.FindElement(bBy).Click();
     }catch (Exception ex)
     {
         Hooks.CaptureScreenshot(_iDriver);
         this._scenarioContext.Add("Exception", ex.Message);
     }
 }
        /// <summary>
        /// Wait for multiple elements and returns true If all elements are found otherwise false
        /// </summary>
        /// <param name="byObj">Element locator</param>
        /// <returns>Returns true If all elements are found otherwise false</returns>
        protected bool WaitAndGetElements(By bBy)
        {
            bool bGetElement = false;

            try
            {
                _iWebElementList = _iDriver.FindElements(bBy);
                foreach (var element in _iWebElementList)
                {
                    if (!(DriverWait(uint.Parse(FrameGlobals.strImplicitWait)).Until(d => element).Enabled))
                    {
                        Hooks.CaptureScreenshot(_iDriver);
                        this._scenarioContext.Add("Exception", "Time out exception. Please try run test case again.");
                    }
                }
                bGetElement = true;
            }catch (Exception ex)
            {
                Hooks.CaptureScreenshot(_iDriver);
                this._scenarioContext.Add("Exception", ex.Message);
            }
            return(bGetElement);
        }