Tabnine Logo
ByJquery
Code IndexAdd Tabnine to your IDE (free)

How to use
ByJquery
in
com.atlassian.webdriver.utils.by

Best Java code snippets using com.atlassian.webdriver.utils.by.ByJquery (Showing top 20 results out of 315)

origin: com.atlassian.confluence.plugins/confluence-create-content-test-support

private By getPromoteOrDemoteLinkSelector(Long id) {
  return ByJquery.$("tr[data-pagetemplate-id='" + id + "']" +
      " button.promoted-template-link");
}
origin: com.atlassian.selenium/atlassian-webdriver-confluence

@Init
public void initialise()
{
  browseMenu = pageBinder.bind(AjsDropdownMenu.class, ByJquery.$("#browse-menu-link").parent("li"));
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

@Init
public void parsePage()
{
  //Check for errors on the page
  if (Check.elementExists(ByJquery.$(ERROR_SELECTOR), driver))
  {
    for (WebElement el : driver.findElements(ByJquery.$(ERROR_SELECTOR)))
    {
      errors.add(el.getText());
    }
  }
  numberOfAssignedIssuesElement = driver.findElement(ByJquery.$("li.user-errors:contains(Assigned Issue)").siblings("li"));
  numberOfReportedIssuesElement = driver.findElement(ByJquery.$("li.user-errors:contains(Reported Issue)").siblings("li"));
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

  public String getDownloadUrl() {
    return driver.findElement(ByJquery.$("#taskCurrentStatus").find("a.space-export-download-path")).getAttribute("href");
  }
}
origin: com.atlassian.selenium/atlassian-webdriver-jira

public Set<String> getUsersGroups(User user)
{
  if (hasUser(user))
  {
    Set<String> groups = new HashSet<String>();
    WebElement groupCol = userTable.findElements(ByJquery.$("#" + user.getUsername()).parents("tr.vcard").find("td")).get(4);
    for (WebElement groupEl : groupCol.findElements(By.tagName("a")))
    {
      groups.add(groupEl.getText());
    }
    return groups;
  }
  else
  {
    throw new IllegalStateException("User: " + user.getUsername() + " was not found.");
  }
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

/**
 * Mouse-hover over the user icon and wait for the AUI dialog to appear
 */
public UserHoverPopup openUserHoverPopup(String username) {
  waitForJsBindingsIfNeeded();
  PageElement userLogo = finder.find(By.cssSelector(String.format(".userLogoLink[data-username='%s']", username)));
  actions.moveToElement(userLogo);
  actions.perform();
  // Here we are finding the popup element by finding a .ajs-content-hover element where the child a has data-username= provided username.
  PageElement popupElement = finder.find(ByJquery.$(".ajs-content-hover a[data-username='" + username + "']").closest(".ajs-content-hover"));
  return pageBinder.bind(UserHoverPopup.class, popupElement);
}
origin: com.atlassian.selenium/atlassian-webdriver-core

public ByJquery parent()
{
  return parent(null);
}
origin: com.atlassian.selenium/atlassian-webdriver-core

public ByJquery siblings()
{
  return siblings(null);
}
origin: com.atlassian.selenium/atlassian-webdriver-core

public ByJquery children()
{
  return children(null);
}
origin: com.atlassian.selenium/atlassian-webdriver-core

public ByJquery parents()
{
  return parents(null);
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public static UserHoverPopup openUserHoverPopup(String username, PageElementFinder finder, PageElementActions actions, PageBinder pageBinder) {
  PageElement userLogo = finder.find(By.cssSelector(String.format(".userLogoLink[data-username='%s']", username)));
  waitUntilTrue("User logo should be visible for " + username, userLogo.timed().isVisible());
  actions.moveToElement(userLogo).perform();
  // Here we are finding the popup element by finding a .ajs-content-hover element where the child a has data-username= provided username.
  PageElement popupElement = finder.find(ByJquery.$(".ajs-content-hover a[data-username='" + username + "']").closest(".ajs-content-hover"));
  return pageBinder.bind(UserHoverPopup.class, popupElement);
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public void unfavourite() {
  driver.findElement(getFavouriteToggleElementLocator().children(REMOVE_FAVOURITE_SELECTOR)).click();
  waiter.until(5).element(getFavouriteToggleElementLocator().children(ADD_FAVOURITE_SELECTOR)).isVisible().execute();
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

private By getPromoteOrDemoteLinkSelector(Long id) {
  return ByJquery.$("tr[data-pagetemplate-id='" + id + "']" +
      " button.promoted-template-link");
}
origin: com.atlassian.selenium/atlassian-webdriver-jira

@Init
public void initialise()
{
  dashboardMenu = pageBinder.bind(AuiDropdownMenu.class, ByJquery.$("#home_link").parent("li"));
}
origin: com.atlassian.selenium/atlassian-webdriver-jira

@Init
public void parsePage()
{
  //Check for errors on the page
  if (Check.elementExists(ByJquery.$(ERROR_SELECTOR), driver))
  {
    for (WebElement el : driver.findElements(ByJquery.$(ERROR_SELECTOR)))
    {
      errors.add(el.getText());
    }
  }
  numberOfAssignedIssuesElement = driver.findElement(ByJquery.$("td.fieldLabelArea:contains(Assigned Issues)").siblings("td"));
  numberOfReportedIssuesElement = driver.findElement(ByJquery.$("td.fieldLabelArea:contains(Reported Issues)").siblings("td"));
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public boolean checkFavouriteStatus(boolean favourite) {
  String selector = favourite ? REMOVE_FAVOURITE_SELECTOR : ADD_FAVOURITE_SELECTOR;
  return driver.findElement(getFavouriteToggleElementLocator().children(selector)).isDisplayed();
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

private By byText(String text) {
  return ByJquery.$(".select2-result-label:contains('" + text + "')");
}
origin: com.atlassian.selenium/atlassian-webdriver-jira

@Init
public void initialise()
{
  adminMenu = pageBinder.bind(AuiDropdownMenu.class, ByJquery.$("#admin_link").parent("li"));
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public void favourite() {
  driver.findElement(getFavouriteToggleElementLocator().children(ADD_FAVOURITE_SELECTOR)).click();
  waiter.until(5).element(getFavouriteToggleElementLocator().children(REMOVE_FAVOURITE_SELECTOR)).isVisible().execute();
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

private By getPromoteOrDemoteLinkSelector(Long id) {
  return ByJquery.$("tr[data-pagetemplate-id='" + id + "']" +
      " button.promoted-template-link");
}
com.atlassian.webdriver.utils.byByJquery

Javadoc

Provides an extension to By so that jQuery selectors can be used. By calling the ByJquery.$ method will ensure that jQuery get's loaded into the page. It is namespaced away within the javascript so that it doesn't override another version of jQuery on the page. This allows the ByJquery locator to be dependent on it's own version of jQuery.

same usages of ByJquery include: ByJquery.$("div.className li"); ByJQuery.$("('div.className li a').parent('div')"); It accepts simple searches like the first example that don't need to be wrapped in brackets, but if you want to call another jQuery method like .parent the first selector needs to be wrapped in brackets.

Most used methods

  • $
  • parent
  • siblings
  • children
  • find
  • parents
  • $findElements
  • <init>
  • addSelector
  • closest
  • executeClassNameMatcher
  • executeIdMatcher
  • executeClassNameMatcher,
  • executeIdMatcher,
  • executeMatcher,
  • executeSimpleSelector,
  • executeTagNameMatcher,
  • findElements,
  • fixSelector,
  • isSimpleSelector,
  • loadJqueryLocator,
  • prev

Popular in Java

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • findViewById (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JLabel (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now