Hello dev:
As title said:
|
private async send(): Promise<boolean> { |
|
const page = await this.page; |
|
// 依赖input进行定位 |
|
const target = page.locator('input[type="file"][multiple] + * [aria-disabled="false"]').first(); |
|
if (!await target.count()) return false; |
|
await target.scrollIntoViewIfNeeded(); |
|
await target.click(); |
|
return true; |
|
} |
private async send(): Promise<boolean> {
const page = await this.page;
// 根据真实 HTML 结构定位:包含 SVG 且不含禁用类名的 div 按钮
const target = page.locator('div[role="button"]:has(svg):not(.ds-button--disabled)').last();
if (!await target.count()) {
// 如果找不到启用的按钮,尝试按回车作为兜底
await page.keyboard.press('Enter');
return true;
}
await target.scrollIntoViewIfNeeded();
await target.click();
return true;
}
pnpm chat-browser "Hello"
崩溃时, 竟然打印不出这个 error
|
if (!sent) throw new Error("Failed to click DeepSeek send button."); |

Hello dev:
As title said:
WebAI2API/src/deepseekBrowserClient.ts
Lines 116 to 124 in 02936a2
pnpm chat-browser "Hello"崩溃时, 竟然打印不出这个 error
WebAI2API/src/deepseekBrowserClient.ts
Line 351 in 02936a2