/// <inheritdoc /> public override string GetAttributeValueImpl(string attributeName) { var name = attributeName.ToLowerInvariant(); string value = null; if (name.Equals("href")) { UtilityClass.TryActionIgnoreException(() => value = Url); } else if (name.Equals("title")) { UtilityClass.TryActionIgnoreException(() => value = Title); } else if (name.Equals("hwnd")) { UtilityClass.TryActionIgnoreException(() => value = hWnd.ToString()); } else if (name.Equals("process")) { int ProcessId; NativeMethods.GetWindowThreadProcessId(hWnd, out ProcessId); UtilityClass.TryActionIgnoreException(() => value = ProcessId.ToString()); } else { throw new InvalidAttributeException(attributeName, "IE"); } return(value); }
/// <inheritdoc /> protected override string GetAttributeValueImpl(string attributeName) { string value = null; if (StringComparer.AreEqual(attributeName, "href", true)) { UtilityClass.TryActionIgnoreException(() => value = Url); } else if (StringComparer.AreEqual(attributeName, "title", true)) { UtilityClass.TryActionIgnoreException(() => value = Title); } else { throw new InvalidAttributeException(attributeName, "HTMLDialog"); } return(value); }
/// <inheritdoc /> protected override string GetAttributeValueImpl(string attributeName) { var name = attributeName.ToLowerInvariant(); string value = null; if (name.Equals("href")) { UtilityClass.TryActionIgnoreException(() => value = Url); } else if (name.Equals("title")) { UtilityClass.TryActionIgnoreException(() => value = Title); } else if (name.Equals("hwnd")) { UtilityClass.TryActionIgnoreException(() => value = hWnd.ToString()); } else { throw new InvalidAttributeException(attributeName, "IE"); } return value; }
/// <inheritdoc /> protected override string GetAttributeValueImpl(string attributeName) { var name = attributeName.ToLowerInvariant(); string value = null; if (name.Equals("href")) { UtilityClass.TryActionIgnoreException(() => value = ie.LocationURL); } else if (name.Equals("title")) { UtilityClass.TryActionIgnoreException(() => value = ((HTMLDocument)ie.Document).title); } else if (name.Equals("hwnd")) { UtilityClass.TryActionIgnoreException(() => value = ie.HWND.ToString()); } else { throw new InvalidAttributeException(attributeName, "IE"); } return(value); }