feat: MCP Browser v3.0 - 42 tools with stealth mode, multi-tab, PDF, cookies, storage, network logs, device emulation
This commit is contained in:
+3
-12
@@ -1,16 +1,7 @@
|
||||
const browser = require('../browser');
|
||||
|
||||
module.exports = async ({ fullPage = true }) => {
|
||||
module.exports = async ({ fullPage = true, element = null, path: customPath = null }) => {
|
||||
await browser.start();
|
||||
const p = await browser.ensurePage();
|
||||
|
||||
const path = `screenshot-${Date.now()}.png`;
|
||||
|
||||
await p.screenshot({ path, fullPage });
|
||||
|
||||
return {
|
||||
success: true,
|
||||
action: "screenshot",
|
||||
file: path
|
||||
};
|
||||
const file = await browser.screenshot({ fullPage, path: customPath, element });
|
||||
return { success: true, action: 'screenshot', file };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user