MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / waitForButtonEnabled

Function waitForButtonEnabled

content/signup-page.js:1824–1832  ·  view source on GitHub ↗
(button, timeout = 8000)

Source from the content-addressed store, hash-verified

1822}
1823
1824async function waitForButtonEnabled(button, timeout = 8000) {
1825 const start = Date.now();
1826 while (Date.now() - start < timeout) {
1827 throwIfStopped();
1828 if (isButtonEnabled(button)) return;
1829 await sleep(150);
1830 }
1831 throw new Error('“继续”按钮长时间不可点击。URL: ' + location.href);
1832}
1833
1834function isButtonEnabled(button) {
1835 return Boolean(button)

Callers 1

Calls 3

isButtonEnabledFunction · 0.85
sleepFunction · 0.85
throwIfStoppedFunction · 0.70

Tested by

no test coverage detected