public Iterable<String> getLinks() { return Iterables.transform(item.findAll(By.cssSelector("a")), new Function<PageElement, String>() { @Override public String apply(final PageElement pageElement) { return pageElement.getAttribute("href"); } }); }
public Collection<IssueHistoryItem> getHistoryDataElements() { return item.findAll(By.cssSelector("tbody tr")).stream().map(tr -> pageBinder.bind(IssueHistoryItem.class, tr)).collect(Collectors.toList()); } }
public Iterable<String> getIssueKeys() { return issuetable.findAll(By.cssSelector(ISSUE_ROW_WITH_ISSUEKEY_SELECTOR)).stream() .map(el -> el.getAttribute(ISSUEKEY_ATTRIBUTE)) .collect(Collectors.toList()); } }
public Collection<String> getSelectedApplications() { return createForm.findAll(SELECTOR_APPS_SELECTED).stream() .map(element -> element.getAttribute("value")) .collect(CollectorsUtil.toImmutableList()); }
public List<String> getLabels() { return pageElement.findAll(LABELS_SELECTOR).stream() .map(element -> element.getText()) .collect(CollectorsUtil.toImmutableList()); }
public List<String> getLabels() { return labels.findAll(By.className("group-label-lozenge")).stream() .map(PageElement::getText) .collect(CollectorsUtil.toImmutableList()); }
public List<Subtask> getSubtasks() { List<Subtask> subtasks = new ArrayList<Subtask>(); final List<PageElement> issues = module.findAll(By.className("issuerow")); for (PageElement issue : issues) { subtasks.add(binder.bind(Subtask.class, issue)); } return subtasks; }
public List<String> getVoters() { final ArrayList<String> usernames = new ArrayList<String>(); final List<PageElement> watchers = this.votersDialog.findAll(By.cssSelector(".recipients li")); for (PageElement watcher : watchers) { usernames.add(watcher.getAttribute("data-username")); } return usernames; }
public List<String> getCustomAvatars() { final List<String> result = Lists.newArrayList(); for(PageElement avatar : dialog.findAll(By.cssSelector("ul.jira-avatars li.jira-custom-avatar"))) { result.add(avatar.getAttribute("data-id")); } return result; }
private List<PageElement> jiraInfoElements() { return finder.find(By.id("jira-info")).findAll(By.cssSelector("tr")); } }
public Iterable<TrustedAppRow> getAllApps() { return Iterables.transform(table.findAll(By.cssSelector("tr[class=\"rowNormal\"]")), PageElements.bind(pageBinder, TrustedAppRow.class)); }
public boolean adminMenuHasAdminLink(final String href) { List<PageElement> links = findAdminMenuContent().findAll(By.tagName("a")); return Iterables.any(links, new Predicate<PageElement>() { @Override public boolean apply(@Nullable PageElement pageElement) { return href.equals(pageElement.getAttribute("href")); } }); }
public List<String> getApplicationIds() { return applicationAccess().findAll(By.cssSelector(".application")).stream() .map(pageElement -> pageElement.getAttribute("data-key")) .collect(Collectors.toList()); }
public List<String> getTabs() { final List<String> tabs = new ArrayList<String>(); final List<PageElement> tabsEls = getDialogElement().findAll(By.cssSelector(".tabs-menu .menu-item strong")); for (PageElement tab : tabsEls) { tabs.add(tab.getText().trim()); } return tabs; }
@Override public Iterable<JobRunnerRow> get() { return PageElements.transform(pageBinder, runnersTable.findAll(By.cssSelector("tr.runner")), JobRunnerRow.class); } });
@Override public Iterable<MultiSelectSuggestion> get() { return PageElements.transform(pageBinder, container.findAll(By.tagName("li")), MultiSelectSuggestion.class); } });
public List<AdvancedApplicationProperty> getApplicationProperties() { final List<AdvancedApplicationProperty> applicationProperties = Lists.newArrayList(); final List<PageElement> rows = advancedPropertiesTable.findAll(By.cssSelector(".aui-restfultable-row")); for (final PageElement row : rows) { applicationProperties.add(createApplicationPropertyFromRow(By.cssSelector("tr[data-row-key='" + row.getAttribute("data-row-key") + "']"))); } return applicationProperties; }
public Iterable<UpdateField> getUpdateFields() { Poller.waitUntilTrue("Update fields table is not present", updateFieldsTablEl.timed().isPresent()); return Iterables.transform(updateFieldsTablEl.findAll(By.cssSelector("tbody tr")), row -> { List<PageElement> tds = row.findAll(By.tagName("td")); return new UpdateField(tds.get(0).getText(), tds.get(1).getText()); }); } }
public IssuePickerPopup triggerSearchModeFilterByText(CharSequence filterText) { triggerSearchModeFilter(); for (PageElement option : elementFinder.find(By.id("searchRequestId")).findAll(By.tagName("option"))) { if (option.getText().contains(filterText)) { option.click(); } } return this; }
public UserRow(PageElement rowElement) { this.rowElement = rowElement; usernameLink = rowElement.find(byCellType("username")).find(By.className("username")); fullName = rowElement.find(byCellType("fullname")); loginDetailsCell = rowElement.find(byCellType("login-details")); operationsCell = rowElement.find(byCellType("operations")); userDirectory = rowElement.find(byCellType("user-directory")); userGroupLinks = rowElement.find(byCellType("user-groups")).findAll(By.tagName("a")); applicationRolesCells = rowElement.find(byCellType("user-application-roles")); }