{"record":{"id":"766b5b568c12b41d","repo":"jackwener/OpenCLI","slug":"more-actions-button-not-found","errorCode":null,"errorMessage":"More Actions button not found","messagePattern":"More Actions button not found","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/qoder/ui.js","lineNumber":313,"sourceCode":"        });\n        return rows;\n    },\n});\n\n// -------- more-actions --------\ncli({\n    site: 'qoder',\n    name: 'more-actions',\n    access: 'read',\n    description: 'Click the \"More Actions\" button and list its menu items.',\n    domain: 'localhost',\n    strategy: Strategy.UI,\n    browser: true,\n    args: [],\n    columns: ['Index', 'Item'],\n    func: async (page) => {\n        const res = await evaluateQoder(page, clickByTextScript(['More Actions']));\n        if (!res?.ok) throw new CommandExecutionError(res?.reason || 'More Actions button not found', '');\n        await page.wait(0.4);\n        const items = requireArrayResult(await evaluateQoder(page, `(() => {\n      ${IS_VISIBLE_JS}\n      const popovers = Array.from(document.querySelectorAll('[role=\"menu\"], [role=\"dialog\"], [class*=\"popover\"i], [class*=\"menu\"i]')).filter(isVisible)\n        .filter((el) => { const r = el.getBoundingClientRect(); return r.width < 500 && r.height < 600; });\n      if (!popovers.length) return [];\n      const pop = popovers[popovers.length - 1];\n      return Array.from(pop.querySelectorAll('[role=\"menuitem\"], button'))\n        .filter(isVisible)\n        .map((b) => (b.innerText || b.textContent || '').trim().replace(/\\\\s+/g, ' '))\n        .filter(Boolean);\n    })()`), 'qoder more-actions');\n        try { await page.evaluate(`document.body.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));`); } catch {}\n        if (!items.length) {\n            throw new EmptyResultError('qoder more-actions', 'Menu opened but no items detected.');\n        }\n        return items.map((it, i) => ({ Index: i + 1, Item: it }));\n    },","sourceCodeStart":295,"sourceCodeEnd":331,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/qoder/ui.js#L295-L331","documentation":"The Qoder 'more-actions' UI command clicks a visible 'More Actions' element to open the context menu, then lists its items. If clickByTextScript returns {ok:false} (no matching visible element), it throws CommandExecutionError('More Actions button not found'). The trigger button for the actions menu was not found in the DOM.","triggerScenarios":"Running 'more-actions' when the More Actions control is hidden (no selection/context in the Qoder UI), the UI is still loading, the label is icon-only ('...' without text), or the wording changed in a Qoder update.","commonSituations":"Qoder update replaced the text button with an ellipsis icon button (no innerText to match); menu only available in certain views; window minimized so isVisible fails; welcome screen covering the toolbar.","solutions":["Open the Qoder view where More Actions is available (e.g. select a Quest/element that exposes it) and retry.","Add icon-button selector fallbacks via clickFirstScript(['[aria-label*=\"more\" i]', '[title*=\"more\" i]', 'button[aria-haspopup=\"menu\"]']).","Add a startup wait and re-run the command.","Verify the current control's label/selector in CDP DevTools and update clis/qoder/ui.js.","Dismiss any modal blocking the toolbar."],"exampleFix":"// before\nconst res = await evaluateQoder(page, clickByTextScript(['More Actions']));\n// after: text + icon fallbacks\nlet res = await evaluateQoder(page, clickByTextScript(['More Actions']));\nif (!res?.ok) res = await evaluateQoder(page, clickFirstScript(['[aria-label*=\"more\" i]', '[aria-label*=\"action\" i]']));","handlingStrategy":"fallback","validationCode":"async function moreActionsAvailable(page) {\n  const probe = await page.evaluate(`(() => {\n    const byText = Array.from(document.querySelectorAll('button, [role=\"button\"]'))\n      .some(b => (b.innerText||'').toLowerCase().includes('more actions'));\n    const byIcon = !!document.querySelector('[aria-label*=\"more\" i], [title*=\"more\" i]');\n    return byText || byIcon;\n  })()`);\n  if (probe !== true) throw new Error('More Actions control not present in current view.');\n}","typeGuard":"function isClickResult(res) {\n  return res !== null && typeof res === 'object' && typeof res.ok === 'boolean';\n}","tryCatchPattern":"try {\n  await cli.run(['qoder', 'more-actions']);\n} catch (e) {\n  if (String(e.message).includes('More Actions button not found')) {\n    console.error('Navigate to the view exposing More Actions (or select an item) and retry.');\n  } else throw e;\n}","preventionTips":["Navigate to the Qoder view where More Actions exists before running the command","Select a Quest/element first if the menu is context-dependent","Check for icon-only replacements after Qoder updates (no innerText to match)","Keep the window visible to avoid zero-size-rect visibility failures"],"tags":["ui-automation","electron","cdp","selector-not-found"],"backgroundTag":"ui-element-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}