Beispiel #1
0
        /// <summary>
        /// Get the value for the requested property.
        /// Note: This requires first locating an element and then calling this.
        /// </summary>
        /// <param name="propertyName">Property value for the requested element.</param>
        /// <returns></returns>
        public string GetProperty(string propertyName)
        {
            if (WebElement != null)
            {
                return(WebElement.GetProperty(propertyName));
            }
            else
            {
                LogManager.Error($"Unable to find the property {propertyName} for the requested element");

                return(string.Empty);
            }
        }
 public void AssertThatTheEmailsAreSame(WebElement element)
 {
     Assert.AreEqual(element.Text, element.GetProperty());
 }
Beispiel #3
0
 string IWebElement.GetProperty(string propertyName)
 {
     return(WebElement.GetProperty(propertyName));
 }
 /// <summary>
 /// This method will wait until property value is not null.
 /// If you don't want to wait set default param retries value to 1.
 /// </summary>
 /// <param name="element"></param>
 /// <param name="propertyName">Name of property you are looking for.</param>
 /// <param name="retries">Default value is 0, that means it will use your application settings values for retries.</param>
 /// <returns></returns>
 public static string WaitForProperty(this WebElement element, string propertyName, int retries = 0)
 => WaitForCondition(() => element.GetProperty(propertyName), e => e.Length == 0, retries);