fix: 支持 Step 9 回调提交按钮的多语言匹配
- 合并 PR #75 的核心改动:将 CPA Step 9 的回调提交按钮匹配从宽泛的“提交”文本收紧为中英俄三种明确文案匹配 - 本地补充修复:无额外代码修复;已按流程将目标分支校正为 dev 并完成审查 - 影响范围:content/vps-panel.js,CPA Step 9 回调提交流程
This commit is contained in:
@@ -603,25 +603,26 @@ async function step9_vpsVerify(payload) {
|
||||
fillInput(urlInput, localhostUrl);
|
||||
log(`步骤 9:已填写回调地址:${localhostUrl.slice(0, 80)}...`);
|
||||
|
||||
// Find and click "提交回调 URL" button
|
||||
// Find and click the callback submit button in supported UI languages.
|
||||
const callbackSubmitPattern = /提交回调\s*URL|Submit\s+Callback\s+URL|Отправить\s+Callback\s+URL/i;
|
||||
let submitBtn = null;
|
||||
try {
|
||||
submitBtn = await waitForElementByText(
|
||||
'[class*="callbackActions"] button, [class*="callbackSection"] button',
|
||||
/提交/,
|
||||
callbackSubmitPattern,
|
||||
5000
|
||||
);
|
||||
} catch {
|
||||
try {
|
||||
submitBtn = await waitForElementByText('button.btn', /提交回调/, 5000);
|
||||
submitBtn = await waitForElementByText('button.btn', callbackSubmitPattern, 5000);
|
||||
} catch {
|
||||
throw new Error('未找到“提交回调 URL”按钮。URL: ' + location.href);
|
||||
throw new Error('未找到回调提交按钮(提交回调 URL / Submit Callback URL / Отправить Callback URL)。URL: ' + location.href);
|
||||
}
|
||||
}
|
||||
|
||||
await humanPause(450, 1200);
|
||||
simulateClick(submitBtn);
|
||||
log('步骤 9:已点击“提交回调 URL”,正在等待认证结果...');
|
||||
log('步骤 9:已点击回调提交按钮,正在等待认证结果...');
|
||||
|
||||
const verifiedStatus = await waitForExactSuccessBadge();
|
||||
log(`步骤 9:${verifiedStatus}`, 'ok');
|
||||
|
||||
Reference in New Issue
Block a user