feat(devtools): chrome devtools + pick locator#39256
Conversation
This comment has been minimized.
This comment has been minimized.
| frame: { data: string; viewportWidth: number; viewportHeight: number }; | ||
| tabs: { tabs: Tab[] }; | ||
| elementPicked: { selector: string }; | ||
| recorderModeChanged: { picking: boolean }; |
There was a problem hiding this comment.
Why do we need this event, when picking is explicitly controlled through pickLocator()/cancelPickLocator() methods from the other side?
I'd understand this one if we can click in the page to change the mode, e.g. start recording or something. But then it would have the mode argument, not picking.
| if (browserConfig.browserName === 'chromium') { | ||
| (browserConfig.launchOptions as any).cdpPort = await findFreePort(); | ||
| (browserConfig.launchOptions as any).args ??= []; | ||
| (browserConfig.launchOptions as any).args.push('--remote-allow-origins=*'); // TODO: make this secure by allowing only our origins. maybe proxy instead? |
There was a problem hiding this comment.
- Let's figure this out.
- It would be great for things to work without forcing
--remote-debugging-port.
| }, [captured]); | ||
|
|
||
| React.useEffect(() => { | ||
| pickingRef.current = picking; |
There was a problem hiding this comment.
I can't say I understand the relationship between picking and pickingRef...
This comment has been minimized.
This comment has been minimized.
ab1630b to
d234944
Compare
This comment has been minimized.
This comment has been minimized.
| } | ||
|
|
||
| private async _initializeRawSession(pageId: string) { | ||
| const page = this._context.pages().find(p => p.guid === pageId); |
There was a problem hiding this comment.
Should this change upon selectTab()? I am not sure how the UI works, perhaps we need to reopen DevTools with a different ws url?
There was a problem hiding this comment.
the UI reloads the devtools iframe upon switching tabs, everything's fine.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "tests 1"23 failed 4 flaky38517 passed, 843 skipped Merge workflow run. |
Test results for "MCP"1 failed 4804 passed, 135 skipped Merge workflow run. |
No description provided.