Skip to content

Commit

Permalink
fix(script): 优化智慧树弹窗答题
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Oct 20, 2023
1 parent 8cbcc94 commit e7a7a1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/scripts/src/projects/zhs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,9 @@ export const ZHSProject = Project.create({
// 最小化脚本窗口
CommonProject.scripts.render.methods.moveToEdge();
// 随机选
const option = options[Math.floor(Math.random() * options.length)];
await $app_actions.mouseClick(option);
const random = Math.floor(Math.random() * options.length);
// nth-child 从1开始
await $app_actions.mouseClick(`#playTopic-dialog .topic .radio ul > li:nth-child(${random + 1})`);
await $.sleep(1000);
// 关闭弹窗
await $app_actions.mouseClick('#playTopic-dialog .dialog-footer .btn');
Expand Down

0 comments on commit e7a7a1f

Please sign in to comment.