/// <summary> /// Initializes a new instance of the <see cref="KMultiSelectComponent{T}"/> class. /// </summary> /// <param name="selector">The selector.</param> /// <param name="driver">The driver.</param> /// <param name="configuration">The configuration.</param> /// <param name="parent">The parent.</param> public KMultiSelectComponent(By selector, IWebDriver driver, KMultiSelectConfiguration configuration, T parent) : base(configuration, selector, driver, parent) { this.configuration = configuration; this.animationData = configuration.AnimationOptions; }
/// <inheritDoc/> protected virtual void WaitForAnimationEnd( KMultiSelectAnimationOptions animationData = null) { var data = animationData ?? this.animationData; if (!data.AnimationsEnabled) { return; } WrappedDriver .Wait(data.AnimationDuration) .Until(d => IsExpanded); }
/// <inheritDoc/> protected virtual void WaitForAnimationStart( KMultiSelectAnimationOptions animationData = null) { var data = animationData ?? this.animationData; if (!data.AnimationsEnabled) { return; } var eventName = IsExpanded ? "close" : "open"; var promise = GetPromiseForKendoEvent(eventName); WrappedDriver.Wait( data.AnimationDuration, new[] { typeof(TimeoutException) }) .Until(d => promise.Finished); }
/// <inheritDoc/> protected virtual bool IsCurrentlyAnimating( KMultiSelectAnimationOptions animationData = null) { var animationContainer = ListContainerElement.GetParentElement(); var initialHeight = animationContainer.GetCssValue("height"); var result = false; WrappedDriver.Wait( TimeSpan.FromMilliseconds(100), new[] { typeof(TimeoutException) }) .Until(d => { result = animationContainer.GetCssValue("height") != initialHeight; return(result); }); return(result); }