Skip to content

Commit

Permalink
fix: baidu waitForSelector bug
Browse files Browse the repository at this point in the history
  • Loading branch information
WindomZ committed Nov 19, 2017
1 parent d77291b commit 4a94811
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/providers/baidu.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ module.exports = class extends Provider {

await page.click('#TANGRAM__PSP_3__smsTimer');

// 如果需要注册
await page
.waitForSelector('#TANGRAM__PSP_3__smsRegPromptWrapper', { timeout: 500, visible: true })
.then(() => {
page.click('#TANGRAM__PSP_3__smsRegPromptBtn');
try {
// 如果需要注册
await page.waitForSelector('#TANGRAM__PSP_3__smsRegPromptWrapper', {
timeout: 500,
visible: true,
});
await page.click('#TANGRAM__PSP_3__smsRegPromptBtn');
} catch (err) {}

// 检验是否发送成功
await page.waitForSelector('#TANGRAM__PSP_3__smsTimer.pass-item-time-timing', {
Expand Down

0 comments on commit 4a94811

Please sign in to comment.