/// <summary>
 /// Creates a dynamic element that uses the parent element as the base of the search
 /// </summary>
 /// <param name="page"></param>
 /// <param name="displayName"></param>
 /// <param name="parentElement"></param>
 public DynamicElement(IPageObject page, string displayName, DynamicElement parentElement)
 {
     ParentElement    = parentElement;
     this.Driver      = page.Driver;
     this.ParentPage  = page.DisplayName;
     this.DisplayName = displayName;
 }
 public DynamicElement(IWebDriver driver, DynamicElement parentElement) : this(driver)
 {
     ParentElement = parentElement;
 }
 public DynamicElement(IWebDriver driver, string displayName, DynamicElement parentElement) : this(driver, parentElement)
 {
     this.DisplayName = displayName;
 }
        public override void Setup()
        {
            //base.Setup();

            AddState("ResultsAvaible", "false");

            SearchBar = new DynamicElement(Driver, "SearchBar").AddSearch(By.Id("lst-ib"))
                .AddSearch(By.CssSelector("input[id='lst-ib']"));
            SearchButton = new DynamicElement(Driver, "SearchButton")
                .AddSearch(By.CssSelector("input[value='Google Search']"));
            Result = new DynamicElement(Driver, "Search Result")
                .AddSearch(By.CssSelector("div[class='g'] div[class='rc'] a"));
        }