Configure CAPES Café Institution Journal Access

Site periodicos.capes.gov.brTask configure-cafe-institution-journal-accessVersion v4Updated Jul 30, 2026Category browser-automation

Select an authorized institution in the CAPES Journals Portal and display its Café journal access list using the portal's autocomplete, institution-control, and submit flow. This skill was captured from a live agent session on periodicos.capes.gov.br and publishes here verbatim, exactly as an agent receives it.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Purpose

Automate the CAPES Journals Portal Café flow for any institution name: open the Café access page, handle the consent prompt, resolve the institution through the portal autocomplete, select its access control, submit the selection, and extract the visible journal access results.

When to Use

Use when the caller has an institution name but needs the CAPES Café portal to resolve and select that institution before viewing its journal access list. The institution name is an input placeholder, not a fixed value.

Workflow

  1. Navigate directly to https://www.periodicos.capes.gov.br/index.php/acesso-cafe.html with domcontentloaded.
  2. If present, click button[aria-label="Aceitar"] to dismiss the consent dialog.
  3. Fill input#select-simple with {institution} and wait for a visible autocomplete option containing the requested institution.
  4. Select the exact matching [role="option"] whose normalized text equals {institution}. If the visible option uses additional context, select the unique option whose normalized text starts with or otherwise clearly identifies {institution}; never assume that typing alone establishes the selection.
  5. Check the institution's input[name="acesso-cafe"] control by clicking its associated label. Resolve the label dynamically from its for attribute or from label text containing {institution}; the for value may be an opaque or acronym-style identifier rather than the full institution name. If the autocomplete selection already checks it, leave it checked.
  6. Submit the selected institution. Prefer button[aria-label="Exibir lista"]; if that control is absent, use the observed form submit control button#enviarInstituicaoCafe. Wait for navigation when submission navigates, then wait for the result content to settle.
  7. In the same Playwright run, evaluate the following extractor on the resulting page:
(() => {
  const visible = (e) => {
    if (!e) return false;
    const s = getComputedStyle(e),
      r = e.getBoundingClientRect();
    return (
      s.display !== "none" &&
      s.visibility !== "hidden" &&
      r.width > 0 &&
      r.height > 0
    );
  };
  const clean = (s) => (s || "").replace(/\s+/g, " ").trim();
  const selected = [
    ...document.querySelectorAll('input[name="acesso-cafe"]:checked'),
  ]
    .map((input) => {
      const label = input.id
        ? document.querySelector(`label[for="${CSS.escape(input.id)}"]`)
        : null;
      return clean(label?.innerText || input.value || input.id);
    })
    .filter(Boolean);
  const accessOptions = [...document.querySelectorAll('input[name="acesso-cafe"]')]
    .map((input) => {
      const label = input.id
        ? document.querySelector(`label[for="${CSS.escape(input.id)}"]`)
        : null;
      return {
        id: input.id || null,
        label: clean(label?.innerText || input.value || input.id),
        checked: !!input.checked,
      };
    })
    .filter((x) => x.label);
  const links = [
    ...document.querySelectorAll("main a[href], #content a[href], a[href]"),
  ]
    .filter(visible)
    .map((a) => ({ text: clean(a.innerText), href: a.href }))
    .filter((x) => x.text || x.href);
  const containers = [
    ...document.querySelectorAll(
      "main table tbody tr, #content table tbody tr, main li, #content li, main .card, #content .card",
    ),
  ]
    .filter(visible)
    .map((e) => clean(e.innerText))
    .filter(Boolean);
  return {
    selectedInstitutions: selected,
    accessOptions,
    visibleEntries: containers,
    visibleLinks: links,
  };
})();

Use one page.goto followed by the required interaction sequence and the final page.evaluate; avoid visiting the homepage or replaying exploratory snapshots.

Site-Specific Gotchas

  • The Café page uses the direct /index.php/acesso-cafe.html path.
  • Consent is represented by a Portuguese button[aria-label="Aceitar"] and may not appear on every run.
  • Institution search is an autocomplete: input#select-simple does not itself establish the selection; choose the exact matching [role="option"].
  • The institution checkbox id is institution-specific and can be an acronym-style value such as INMETRO; never hard-code it. Resolve its associated label[for] or input[name="acesso-cafe"] dynamically.
  • The required order is autocomplete selection, institution checkbox selection, then submission through button[aria-label="Exibir lista"] or the fallback button#enviarInstituicaoCafe.
  • The result markup can contain mixed list, table, card, and link structures; the extractor intentionally returns both normalized container text and visible links.
  • The submit control may trigger navigation after the institution checkbox is selected; wait for that navigation before extracting results.

Expected Output

A JSON object containing selectedInstitutions, all discovered accessOptions with checkbox state, and the displayed page's visibleEntries and visibleLinks.

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=periodicos.capes.gov.br&task=configure-cafe-institution-journal-access