/// <summary> /// 根据 HtmlElement 创建标记对象. /// </summary> /// <param name="element">用于创建标记对象的 HtmlElement.</param> /// <returns>ElementMark 对象.</returns> public static ElementMark Create(HtmlElement element) { if (null == element) { throw new ArgumentNullException("element", "HtmlElement 不能为空"); } return(new ElementMark(element.Id, element.TagName, element.Name, element.GetAttribute("class"), element.GetAttribute("type"), (element.GetAttribute("type") == "text" || element.GetAttribute("type") == "password") ? string.Empty : element.GetAttribute("value"), element.GetAttribute("href"), IEBrowser.GetFramePath(element))); }