diff --git a/bin/codeceptq.js b/bin/codeceptq.js new file mode 100755 index 000000000..a5546e658 --- /dev/null +++ b/bin/codeceptq.js @@ -0,0 +1,49 @@ +#!/usr/bin/env node +import { Command } from 'commander' +import query from '../lib/command/query.js' + +const program = new Command() + +program + .name('codeceptq') + .description('Query HTML with CodeceptJS locators (CSS, XPath, fuzzy text, semantic).\n\nReads HTML from stdin or --file and prints matching elements with line numbers.') + .argument('', 'locator string (CSS, XPath, or text for semantic match)') + .argument('[context]', 'scope locator — restrict matches to descendants of context') + .option('--field', 'treat locator as form field (input/textarea/select)') + .option('--click', 'treat locator as clickable element (link, button, role=button, ...)') + .option('--clickable', 'alias for --click') + .option('--checkable', 'treat locator as checkbox/radio') + .option('--select', 'treat locator as