Skip to content

Commit

Permalink
fix: 修复有些等待选择器,没有设置超时的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Oct 25, 2017
1 parent 55331e8 commit f64d1dd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/providers/久其格格.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = class extends Provider {

await page.click('#phoneRegistTab');

await page.waitForSelector('#chkCodeSendBtn');
await page.waitForSelector('#chkCodeSendBtn', { timeout: 1000 * 5 });

await page.type('#UserName', options.phone, { delay: 100 });
await page.type('#Password', options.password, { delay: 100 });
Expand Down
2 changes: 1 addition & 1 deletion app/providers/优视.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ module.exports = class extends Provider {

await page.click('#getCodeBtn');

await page.waitForSelector('#getCodeBtn.btn_code');
await page.waitForSelector('#getCodeBtn.btn_code', { timeout: 1000 * 5 });
}
};
2 changes: 1 addition & 1 deletion app/providers/优酷.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ module.exports = class extends Provider {
await page.type('#repeatPsd', options.password, { delay: 30 });
await page.click('#getMobileCode');

await page.waitForSelector('#getMobileCode[disable]');
await page.waitForSelector('#getMobileCode[disable]', { timeout: 1000 * 5 });
}
};
2 changes: 1 addition & 1 deletion app/providers/爱奇艺.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = class extends Provider {
const options = ctx.options;
const page = ctx.page;

await page.waitForSelector('input[data-regbox="name"]');
await page.waitForSelector('input[data-regbox="name"]', { timeout: 1000 * 5 });
await page.type('input[data-regbox="name"]', options.phone, { delay: 50 });
await utils.sleep(1000 * 2);
await page.click('[rseat="prgd_smsbtn"]');
Expand Down

0 comments on commit f64d1dd

Please sign in to comment.