/// <summary>
 /// Initializes a new instance of the <see cref="KToolbarComponent{T}"/> class.
 /// </summary>
 /// <param name="configuration"></param>
 /// <param name="selector"></param>
 /// <param name="driver"></param>
 /// <param name="parent">The parent.</param>
 public KToolbarComponent(BaseKendoConfiguration configuration,
                          By selector,
                          IWebDriver driver,
                          T parent)
     : base(configuration,
            selector,
            driver,
            parent)
 {
 }
Пример #2
0
 /// <summary>
 /// The selector should target the original element that's been wrapped
 /// by kendo.
 /// </summary>
 /// <param name="configuration">The configuration.</param>
 /// <param name="selector">The selector.</param>
 /// <param name="driver">The driver.</param>
 /// <param name="animationData">The animation data.</param>
 /// <param name="parent">The parent.</param>
 public KDropDownComponent(BaseKendoConfiguration configuration,
                           By selector,
                           IWebDriver driver,
                           KDropDownAnimationOptions animationData,
                           T parent)
     : base(configuration,
            selector,
            driver,
            parent)
 {
     this.configuration = configuration;
     this.animationData = animationData;
 }
Пример #3
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="driver">The driver.</param>
 /// <param name="selector">The selector.</param>
 /// <param name="pageObjectFactory">The page object factory.</param>
 /// <param name="configuration">The configuration.</param>
 /// <param name="parent">The parent.</param>
 public KGridComponent(BaseKendoConfiguration configuration,
                       By selector,
                       IPageObjectFactory pageObjectFactory,
                       IWebDriver driver,
                       T parent)
     : base(configuration,
            selector,
            driver,
            parent)
 {
     this.configuration = configuration
                          ?? throw new ArgumentNullException(nameof(configuration));
     this.pageObjectFactory = pageObjectFactory
                              ?? throw new ArgumentNullException(nameof(pageObjectFactory));
 }
        /// <summary>
        /// Initializes a new instance of the
        /// <see cref="KPager.KPagerComponent{T}"/> class.
        /// </summary>
        /// <param name="configuration">The configuration.</param>
        /// <param name="selector">The selector.</param>
        /// <param name="pageObjectFactory">The page object factory.</param>
        /// <param name="driver">The driver.</param>
        /// <param name="parent">The parent.</param>
        public KPagerComponent(BaseKendoConfiguration configuration,
                               By selector,
                               IPageObjectFactory pageObjectFactory,
                               IWebDriver driver,
                               T parent)
            : base(configuration,
                   selector,
                   driver,
                   parent)
        {
            if (driver == null)
            {
                throw new ArgumentNullException(nameof(driver));
            }
            else if (selector == null)
            {
                throw new ArgumentNullException(nameof(selector));
            }
            else if (pageObjectFactory == null)
            {
                throw new ArgumentNullException(nameof(pageObjectFactory));
            }

            this.pageObjectFactory = pageObjectFactory;

            ItemsPerPageSelector = new ByChained(
                selector,
                By.CssSelector(".k-pager-sizes .k-dropdown select"));

            ItemsPerPageComponent = new KDropDownComponent <KPagerComponent <T> >(
                configuration,
                ItemsPerPageSelector,
                WrappedDriver,
                new KDropDownAnimationOptions(),
                this);
        }