private List <string> GetDiscussionUrls(IE ie, string siteUrl) { List <string> discussions = new List <string>(); ie.GoTo(siteUrl); ie.WaitForComplete(); bool done = false; ie.Link(Find.ById("discussionTab")).Click(); while (!done) { ie.WaitForComplete(); foreach (var div in ie.Divs) { if (div.ClassName == "post_content") { discussions.Add(div.Link(Find.First()).Url); } } var pag = ie.List(Find.ById("discussion_pagination")); var link = pag.Link(Find.ByText("Next")); if (link.Exists) { link.Click(); } else { done = true; } } return(discussions); }
/// <summary> /// Finds a table row within the table itself (excluding content from any tables that /// might be nested within it). /// </summary> /// <param name="elementId">The element id regular expression</param> /// <returns>The table row</returns> public virtual TableRow OwnTableRow(Regex elementId) { return(OwnTableRow(Find.ById(elementId))); }
/// <summary> /// Finds a table row within the table itself (excluding content from any tables that /// might be nested within it). /// </summary> /// <param name="elementId">The element id</param> /// <returns>The table row</returns> public virtual TableRow OwnTableRow(string elementId) { return(OwnTableRow(Find.ById(elementId))); }
/// <summary> /// Finds a table body within the table itself (excluding content from any tables that /// might be nested within it). /// </summary> /// <param name="elementId">The element id regular expression</param> /// <returns>The table body</returns> public virtual TableBody OwnTableBody(Regex elementId) { return(OwnTableBody(Find.ById(elementId))); }
/// <inheritdoc /> public Constraint ByDefault(Regex value) { return(Find.ById(value)); }
/// <inheritdoc /> public Constraint ByDefault(string value) { return(Find.ById(value)); }
/// <summary> /// Finds a table cell within the table row itself (excluding content from any tables that /// might be nested within it). /// </summary> /// <param name="elementId">The element id regular expression</param> /// <returns>The table cell</returns> public virtual TableCell OwnTableCell(Regex elementId) { return(OwnTableCell(Find.ById(elementId))); }
public virtual TableCell TableCell(Regex elementId, int index) { return(TableCell(Find.ById(elementId) & Find.ByIndex(index))); }
public virtual TableCell TableCell(string elementId, int index) { return(TableCell(Find.ById(elementId) & Find.ByIndex(index) & Find.Any)); }
/// <summary> /// Gets the specified frame by its id. /// </summary> /// <param name="id">The regular expression to match with the id of the frame.</param> /// <exception cref="FrameNotFoundException">Thrown if the given <paramref name="id" /> isn't found.</exception> public virtual Frame Frame(Regex id) { return(Frame(Find.ById(id))); }
/// <summary> /// Gets the specified frame by its id. /// </summary> /// <param name="id">The id of the frame.</param> /// <exception cref="FrameNotFoundException">Thrown if the given <paramref name="id" /> isn't found.</exception> public virtual Frame Frame(string id) { return(Frame(Find.ById(id))); }
public static TableCell TableCell(DomContainer domContainer, Regex elementId, int index, IElementCollection elements) { return(new TableCell(domContainer, domContainer.NativeBrowser.CreateElementFinder(Core.TableCell.ElementTags, Find.ByIndex(index).And(Find.ById(elementId)), elements))); }
public TableCell TableCell(string elementId, int index) { return(TableCell(Find.ById(elementId) & Find.ByIndex(index))); }
/// <summary> /// Finds a list item within the list itself (excluding content from any lists that /// might be nested within it). /// </summary> /// <param name="elementId">The element id regular expression</param> /// <returns>The list item</returns> public virtual ListItem OwnListItem(Regex elementId) { return(OwnListItem(Find.ById(elementId))); }
/// <summary> /// Finds a list item within the list itself (excluding content from any lists that /// might be nested within it). /// </summary> /// <param name="elementId">The element id</param> /// <returns>The list item</returns> public virtual ListItem OwnListItem(string elementId) { return(OwnListItem(Find.ById(elementId))); }