MCPcopy Create free account
hub / github.com/Xu22Web/tech-study-js / getNextButton

Function getNextButton

tech-study.js:2743–2759  ·  view source on GitHub ↗

* @description 获取答题按钮

()

Source from the content-addressed store, hash-verified

2741 * @description 获取答题按钮
2742 */
2743function getNextButton() {
2744 return new Promise((resolve) => {
2745 const timer = setInterval(() => {
2746 // 答题按钮
2747 const nextAll = $$('.ant-btn').filter((next) => next.innerText);
2748 if (nextAll.length) {
2749 // 停止定时器
2750 clearInterval(timer);
2751 if (nextAll.length === 2) {
2752 resolve(nextAll[1]);
2753 return;
2754 }
2755 resolve(nextAll[0]);
2756 }
2757 }, 500);
2758 });
2759}
2760/**
2761 * @description 处理滑动验证
2762 */

Callers 1

doingExamFunction · 0.70

Calls 1

$$Function · 0.70

Tested by

no test coverage detected