chrome-devtools-mcp-for-extension 0.9.35 → 0.9.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -219,7 +219,7 @@ async function enableDeepResearchMode(page, response) {
|
|
|
219
219
|
try {
|
|
220
220
|
response.appendResponseLine('DeepResearchモードを有効化中...');
|
|
221
221
|
// Step 1: Click "+" button (ファイルの追加など)
|
|
222
|
-
const
|
|
222
|
+
const plusButtonSelector = await page.evaluate(() => {
|
|
223
223
|
const buttons = Array.from(document.querySelectorAll('button'));
|
|
224
224
|
const plusButton = buttons.find((btn) => {
|
|
225
225
|
const aria = btn.getAttribute('aria-label') || '';
|
|
@@ -227,12 +227,15 @@ async function enableDeepResearchMode(page, response) {
|
|
|
227
227
|
});
|
|
228
228
|
if (!plusButton)
|
|
229
229
|
return { success: false, error: '+ボタン(ファイルの追加など)が見つかりません' };
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
// Return selector info instead of clicking
|
|
231
|
+
const ariaLabel = plusButton.getAttribute('aria-label');
|
|
232
|
+
return { success: true, ariaLabel };
|
|
232
233
|
});
|
|
233
|
-
if (!
|
|
234
|
-
return { success: false, error:
|
|
234
|
+
if (!plusButtonSelector.success) {
|
|
235
|
+
return { success: false, error: plusButtonSelector.error };
|
|
235
236
|
}
|
|
237
|
+
// Use Puppeteer's click for reliable interaction
|
|
238
|
+
await page.click(`button[aria-label="${plusButtonSelector.ariaLabel}"]`);
|
|
236
239
|
response.appendResponseLine('✅ +ボタン(ファイルの追加など)をクリック');
|
|
237
240
|
// Wait for menu to appear
|
|
238
241
|
await page.waitForSelector('[role="menuitemradio"]', { visible: true, timeout: 5000 });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.36",
|
|
4
4
|
"description": "MCP server for Chrome extension development with Web Store automation. Fork of chrome-devtools-mcp with extension-specific tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./build/src/index.js",
|