/// <summary> /// Initializes a new instance of the <see cref="AbstractLazyIWebElement" /> class /// </summary> /// <param name="testObject">The base test object</param> /// <param name="locator">The 'by' selector for the element</param> /// <param name="cachedElement">The cached web element</param> /// <param name="index">The index of the element - Used if the by finds multiple elements</param> /// <param name="userFriendlyName">A user friendly name, for logging purposes</param> protected AbstractLazyIWebElement(AbstractLazyIWebElement parent, By locator, IWebElement cachedElement, int index, [CallerMemberName] string userFriendlyName = null) : this(parent.TestObject, parent.WebDriver, locator, userFriendlyName) { this.parent = parent; this.CachedElement = cachedElement; this.elementIndex = index; }
/// <summary> /// Initializes a new instance of the <see cref="AbstractLazyIWebElement" /> class /// </summary> /// <param name="parent">The parent lazy element</param> /// <param name="locator">The 'by' selector for the element</param> /// <param name="userFriendlyName">A user friendly name, for logging purposes</param> protected AbstractLazyIWebElement(AbstractLazyIWebElement parent, By locator, [CallerMemberName] string userFriendlyName = null) : this(parent.TestObject, parent.WebDriver, locator, userFriendlyName) { this.parent = parent; }