title: C# Webdriver FindsBy - for Kendo elements
body: <p>I am trying to introduce FindsBy  in my test project</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class BoaRegistrationPage
  {
      public IWebDriver Driver;
  
      public BoaRegistrationPage(IWebDriver driver)
      {
          this.Driver = driver;
          PageFactory.InitElements(driver, this);
      }
  
      [FindsBy(How = How.Id, Using = "ReportingPeriodName")]
      public SeleniumKendoDropDownList ReportingPeriodDropDown { get; set; }
  
      [FindsBy(How=How.Id, Using ="BranchCode")]
      public IWebElement BranchCode { get; set; }
  }
  </code></pre>
  
  <p>(...)</p>
  
  <p>Unfortunately as you can see I need to use it also on type other than IWebElement which returns error (SeleniuKendoDropDownList).</p>
  
  <pre class="lang-cs prettyprint-override"><code>namespace CompanyReviewSeleniumTests.Wrappers
  {
      public class SeleniumKendoDropDownList : KendoDropDownList 
      {
          public SeleniumKendoDropDownList(IWebElement webElement) : base(webElement)
          {
              this.CopyInternalId(webElement);
          }
  
          public void SelectByDataItemProperty(string propertyName, string text)
          {
              Driver.JavaScripts()
                  .ExecuteScript(
                      string.Format(
                          CultureInfo.InvariantCulture,
                          "$('{0}').data('{1}').select(function(dataItem) {{return dataItem.{3} === '{2}';}});",
                          ElementCssSelector,
                          SelectType,
                          text,
                          propertyName));
          }
  
          public new void SelectByText(string text)
          {
              WaitUntilOptionsLoaded();
              Open();
              var listBoxElement = Driver.FindElement(By.CssSelector($"{this.ElementCssSelector}_listbox"));
              listBoxElement.FindElement(By.XPath($".//*[contains(text(),'{text}')]"))?.JavaScriptClick();
          }
      }
  }
  </code></pre>
  
  <p>(...)</p>
  
  <p>How can I manage it?</p>
  
  <p>Thank you in advance for help</p>