github-actions[bot] commited on
Commit ·
3f6e692
1
Parent(s): 3a7f0e0
Update from GitHub Actions
Browse files
functions/utils/authService.ts
CHANGED
|
@@ -77,15 +77,27 @@ export class AuthService {
|
|
| 77 |
} catch (error) {
|
| 78 |
console.log(account.email, `没有旧版切换到密码登录,继续执行: ${error}`);
|
| 79 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
try {
|
| 82 |
const passwordButtonByRole = page.getByRole('button', { name: '使用密码' });
|
| 83 |
if (await passwordButtonByRole.isVisible({ timeout: 3000 })) {
|
| 84 |
await passwordButtonByRole.click();
|
|
|
|
| 85 |
}
|
| 86 |
} catch (error) {
|
| 87 |
console.log(account.email, `没有新版切换到密码登录,继续执行: ${error}`);
|
| 88 |
}
|
|
|
|
|
|
|
| 89 |
await page.waitForURL("https://login.live.com/**");
|
| 90 |
await page.fill('input[type="password"]', account.password);
|
| 91 |
await page.fill('input[type="password"]', account.password);
|
|
@@ -249,7 +261,7 @@ export class AuthService {
|
|
| 249 |
await page.waitForURL((url) => {
|
| 250 |
return url.href.startsWith('https://login.live.com');
|
| 251 |
}, { timeout: 3000 });
|
| 252 |
-
await page.click('button[type="submit"]#acceptButton',{timeout: 3000});
|
| 253 |
} catch (error) {
|
| 254 |
console.log(account.email, `无其他登录确认,继续执行: ${error}`);
|
| 255 |
}
|
|
|
|
| 77 |
} catch (error) {
|
| 78 |
console.log(account.email, `没有旧版切换到密码登录,继续执行: ${error}`);
|
| 79 |
}
|
| 80 |
+
try {
|
| 81 |
+
const passwordButtonByRole = page.getByRole('button', { name: '其他登录方法' });
|
| 82 |
+
if (await passwordButtonByRole.isVisible({ timeout: 3000 })) {
|
| 83 |
+
await passwordButtonByRole.click();
|
| 84 |
+
await page.waitForTimeout(1000); // 等待页面稳定
|
| 85 |
+
}
|
| 86 |
+
} catch (error) {
|
| 87 |
+
console.log(account.email, `没有新版切换到其他登录方法,继续执行: ${error}`);
|
| 88 |
+
}
|
| 89 |
|
| 90 |
try {
|
| 91 |
const passwordButtonByRole = page.getByRole('button', { name: '使用密码' });
|
| 92 |
if (await passwordButtonByRole.isVisible({ timeout: 3000 })) {
|
| 93 |
await passwordButtonByRole.click();
|
| 94 |
+
await page.waitForTimeout(1000); // 等待页面稳定
|
| 95 |
}
|
| 96 |
} catch (error) {
|
| 97 |
console.log(account.email, `没有新版切换到密码登录,继续执行: ${error}`);
|
| 98 |
}
|
| 99 |
+
|
| 100 |
+
|
| 101 |
await page.waitForURL("https://login.live.com/**");
|
| 102 |
await page.fill('input[type="password"]', account.password);
|
| 103 |
await page.fill('input[type="password"]', account.password);
|
|
|
|
| 261 |
await page.waitForURL((url) => {
|
| 262 |
return url.href.startsWith('https://login.live.com');
|
| 263 |
}, { timeout: 3000 });
|
| 264 |
+
await page.click('button[type="submit"]#acceptButton', { timeout: 3000 });
|
| 265 |
} catch (error) {
|
| 266 |
console.log(account.email, `无其他登录确认,继续执行: ${error}`);
|
| 267 |
}
|