m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
7.1k stars 523 forks source link

Playwright automation guide #391

Open subhasishdasfreelance opened 4 months ago

subhasishdasfreelance commented 4 months ago

I added neko:chromium in a docker using the docker compose example found in your website. Also in the same container I have installed playwright.

My goal is to automate neko's chromium using playwright. So user can interact with the browser while also automate it. I'm trying to do something like this with playwright

const browser = await playwright.chromium.connectOverCDP('http://localhost:9222');

However this needs remote debugging. I'm not seeing any option to turn on remote debugging in neko browser.

Can you please tell me what would be the recommended way to do it?

sourav-sarkar-doc32 commented 4 months ago

I am also working with @imnocat with it. Our goal is to run automations in remote server, and let users interact and finish it if the automation gets stuck. We are planning to use some GPT based ai to automate it actually, and most likely it will get stuck and then user will remotely take action via neko's browser ui.

m1k1o commented 3 months ago

You could just add --remote-debugging-port to the chrome and then automate it with playwright.

osamasaeed0 commented 2 months ago

You could just add --remote-debugging-port to the chrome and then automate it with playwright.

Sir can you help me with this problem what should I do now i am stuck nothing is working i have tried a lot of commands

npx playwright test locators.spec.js npm error code ERR_INVALID_URL npm error Invalid URL npm error A complete log of this run can be found in: C:\Users\WikI\AppData\Local\npm-cache_logs\2024-07-18T14_12_05_094Z-debug-0.log