public ByJquery parents(String selector) { addSelector(new Selector(selector, SelectorType.PARENTS)); return this; }
@Override public String toString() { return "DeferredBy(" + super.toString() + ")"; } };
/** * To locate cells marked with 'data-cell-type' attribute. * * @param cellType cell type to find * @return locator */ public static By byCellType(String cellType) { return ByDataAttribute.byTagAndData(PageElements.TD, DATA_CELL_TYPE, cellType); }
private By getPromoteOrDemoteLinkSelector(Long id) { return ByJquery.$("tr[data-pagetemplate-id='" + id + "']" + " button.promoted-template-link"); }
public ByJquery parent() { return parent(null); }
public ByJquery siblings() { return siblings(null); }
public ByJquery children() { return children(null); }
public ByJquery parents() { return parents(null); }
@Override public List<WebElement> findElements(final SearchContext context) { return findElementsWithSelectors(element); }
@Override public List<WebElement> findElements(final SearchContext context) { return findElementsWithSelectors(context); }
private By getPromoteOrDemoteLinkSelector(Long id) { return ByJquery.$("tr[data-pagetemplate-id='" + id + "']" + " button.promoted-template-link"); }
public ByJquery siblings(String selector) { addSelector(new Selector(selector, SelectorType.SIBLINGS)); return this; }
private By byText(String text) { return ByJquery.$(".select2-result-label:contains('" + text + "')"); }
public ByJquery children(String selector) { addSelector(new Selector(selector, SelectorType.CHILDREN)); return this; }
private By getPromoteOrDemoteLinkSelector(Long id) { return ByJquery.$("tr[data-pagetemplate-id='" + id + "']" + " button.promoted-template-link"); }
public ByJquery closest(String selector) { addSelector(new Selector(selector, SelectorType.CLOSEST)); return this; }
public ByJquery parent(String selector) { addSelector(new Selector(selector, SelectorType.PARENT)); return this; }
public ByJquery prev(String selector) { addSelector(new Selector(selector, SelectorType.PREV)); return this; }
/** * This allows filtering results based on a selector or a function. * elements are currently not supported. * @param selector can represent a selector expression or a function */ // TODO(jwilson): SELENIUM-173 Fix up filter method. public ByJquery filter(String selector) { addSelector(new Selector(selector, SelectorType.FILTER)); return this; }
public ByJquery find(String selector) { Validate.notNull(selector, "The find selector cannot be null"); addSelector(new Selector(selector, SelectorType.FIND)); return this; }