Tabnine Logo
PageElement.hasAttribute
Code IndexAdd Tabnine to your IDE (free)

How to use
hasAttribute
method
in
com.atlassian.pageobjects.elements.PageElement

Best Java code snippets using com.atlassian.pageobjects.elements.PageElement.hasAttribute (Showing top 20 results out of 315)

origin: com.atlassian.jira/atlassian-jira-pageobjects

@Override
public boolean matchesSafely(PageElement element)
{
  return element.hasAttribute(attribute, value);
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

  @Override
  public boolean apply(PageElement input)
  {
    return input.hasAttribute("data-" + attribute, value);
  }
};
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

/**
 * @return true if the link is linking to a resource in confluence.
 */
public boolean isInternalLink() {
  return execute.onTinyMceIFrame(() -> linkElement.hasAttribute("data-linked-resource-type", "page") ||
      linkElement.hasAttribute("data-linked-resource-type", "space") ||
      linkElement.hasAttribute("data-linked-resource-type", "userinfo") ||
      linkElement.hasAttribute("data-linked-resource-type", "attachment") ||
      linkElement.hasAttribute("data-linked-resource-type", "blogpost"));
}
origin: com.atlassian.applinks/applinks-pageobjects

  public boolean apply(@Nullable PageElement input) {
    return input.hasAttribute("style", "display: block");
  }
});
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

private boolean isWatcher(List<PageElement> watchers, User user) {
  for (PageElement watcher : watchers) {
    if (watcher.hasAttribute("data-username", user.getUsername()))
      return true;
  }
  return false;
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

public boolean isDefault()
{
  return getDefaultInput().hasAttribute("checked", Boolean.TRUE.toString());
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public boolean isPromoted(ItContentBlueprint blueprint) {
  return getPromoteOrDemoteLink(blueprint).hasAttribute("data-promoted", "true");
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public boolean isModal() {
  return getDialog().hasAttribute(MODAL_ATTRIBUTE, "true");
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

private SpaceTemplatesPage togglePromoteUserTemplate(Long id, boolean promote) {
  By selector = getPromoteOrDemoteLinkSelector(id);
  PageElement link = getUserTemplateTable().find(selector);
  if (link.hasAttribute("data-promoted", "true") && !promote)
    link.click();
  else if (link.hasAttribute("data-promoted", "false") && promote)
    link.click();
  return pageBinder.bind(this.getClass(), space);
}
origin: com.atlassian.confluence.plugins/confluence-create-content-test-support

private BlueprintSpaceTemplatesPage togglePromoteUserTemplate(Long id, boolean promote) {
  By selector = getPromoteOrDemoteLinkSelector(id);
  PageElement link = getUserTemplateTable().find(selector);
  if (link.hasAttribute("data-promoted", "true") && !promote)
    link.click();
  else if (link.hasAttribute("data-promoted", "false") && promote)
    link.click();
  return pageBinder.bind(this.getClass(), space);
}
origin: com.atlassian.confluence.plugins/confluence-create-content-test-support

public boolean isPromoted(long templateId) {
  By selector = getPromoteOrDemoteLinkSelector(templateId);
  PageElement link = getUserTemplateTable().find(selector);
  return link.hasAttribute("data-promoted", "true");
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public boolean isPromoted(long templateId) {
  By selector = getPromoteOrDemoteLinkSelector(templateId);
  PageElement link = getUserTemplateTable().find(selector);
  return link.hasAttribute("data-promoted", "true");
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

public List<String> getEnabledDefaultOptions()
{
  final List<PageElement> options = defaultOptionElement.findAll(By.tagName("option"));
  final List<String> types = Lists.newArrayList();
  for (PageElement option : options)
  {
    final String value = option.getValue();
    if (StringUtils.isNotBlank(value))
    {
      if (!option.hasAttribute("disabled", "true"))
      {
        types.add(StringUtils.trimToEmpty(option.getText()));
      }
    }
  }
  return types;
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

/**
 * As of Confluence 5.9.0, the this macro loads its resources asynchronously and so may not be ready immediately.
 * We detect that and wait if needed.
 */
private void waitForJsBindingsIfNeeded() {
  if (updatesPanel.hasAttribute("data-ready-for-interaction", "false"))
    waiter.until().element(By.cssSelector("#recent-updates[data-ready-for-interaction=true]")).exists().execute();
}
origin: com.atlassian.jira/atlassian-jira-pageobjects

public List<IssueType> getIssueTypes()
{
  List<IssueType> types = Lists.newArrayList();
  final List<PageElement> rows = issueTypesTable.findAll(By.cssSelector("tbody tr"));
  for (PageElement row : rows)
  {
    final List<PageElement> all = row.findAll(By.tagName("td"));
    assertTrue("Not enough columns in the table.", all.size() >= 2);
    final PageElement nameElement = all.get(0);
    final PageElement img = nameElement.find(By.tagName("img"));
    String name = StringUtils.trimToNull(nameElement.find(By.cssSelector("[data-issue-type-field=name]")).getText());
    String iconUrl = img == null ? null : img.getAttribute("src");
    String description = StringUtils.trimToNull(all.get(0).find(By.cssSelector("div.description")).getText());
    boolean subtask = all.get(1).hasAttribute("data-type", "subtask");
    types.add(new IssueType(name, description, subtask, AvatarId.fromImageLink(iconUrl)));
  }
  return types;
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public <T> T promote(ItContentBlueprint blueprint, Class<T> templatePage, Space space) {
  PageElement promoteOrDemoteLink = getPromoteOrDemoteLink(blueprint);
  if (promoteOrDemoteLink.hasAttribute(DATA_PROMOTED, "false")) {
    promoteOrDemoteLink.click();
    Poller.waitUntilTrue(promoteOrDemoteLink.timed().hasAttribute(DATA_PROMOTED, "true"));
  }
  return returnBoundPage(templatePage, space);
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public <T> T demote(final ItContentBlueprint blueprint, Class<T> templatePage, Space space) {
  PageElement promoteOrDemoteLink = getPromoteOrDemoteLink(blueprint);
  if (promoteOrDemoteLink.hasAttribute(DATA_PROMOTED, "true")) {
    promoteOrDemoteLink.click();
    Poller.waitUntilTrue(promoteOrDemoteLink.timed().hasAttribute(DATA_PROMOTED, "false"));
  }
  return returnBoundPage(templatePage, space);
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

public ViewPage clickAndCreatePage() {
  assertFalse(macroButton.hasAttribute("aria-disabled", "true"));
  // If the new page is successfully created, after the click the browser will go to *another* ViewPage that
  // has a different pageId.
  String currentPageId = parentPage.pageId.getAttribute("content");
  macroButton.click();
  Poller.waitUntilFalse(parentPage.pageId.timed().hasAttribute("content", currentPageId));
  return pageBinder.bind(ViewPage.class);
}
origin: com.atlassian.confluence/confluence-webdriver-pageobjects

  private <T extends DashboardEntitiesTab> T gotoTab(PageElement link, Class<T> tab, By tabSelector) {
    if (entitiesPanel.hasAttribute("data-ready-for-interaction", "false"))
      Poller.waitUntil("wait for global entities panel to load", pageElementFinder.find(By.cssSelector(".aui-tabs.global-entities")).withTimeout(TimeoutType.AJAX_ACTION).timed().hasAttribute("data-ready-for-interaction", "true"), is(true));

    link.click();
    final T tabPane = pageBinder.bind(tab);

    assertTrue(tabPane.isVisible());
    Poller.waitUntil("wait for dashboard tab to load", pageElementFinder.find(tabSelector).withTimeout(TimeoutType.AJAX_ACTION).timed().hasClass("content-loaded"), is(true));

    return tabPane;
  }
}
origin: com.atlassian.support/stp-page-objects

@Override
public void setLicense(String license)
{
  List<PageElement> applicationItems = applicationList.findAll(By.className("application-item"));
  for (PageElement application : applicationItems)
  {
    if (application.hasAttribute("data-application-key", "jira-core"))
    {
      applicationCore = application;
    }
  }
  if (applicationCore != null)
  {
    applicationCore.find(By.className("license-string-truncated")).click();
    PageElement licenseField = applicationCore.find(By.className("license-update-textarea"));
    setText(licenseField, license);
  }
}
com.atlassian.pageobjects.elementsPageElementhasAttribute

Popular methods of PageElement

  • timed
  • click
  • getAttribute
  • find
  • getText
  • isPresent
  • javascript
  • type
  • isVisible
  • clear
  • getValue
  • findAll
  • getValue,
  • findAll,
  • isSelected,
  • select,
  • withTimeout,
  • hasClass,
  • getSize,
  • getTagName,
  • isEnabled

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
  • getSystemService (Context)
  • Menu (java.awt)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top Vim 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