-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect to an existing chrome instance #8
Comments
Hmmm, that's an interesting use-case I hadn't considered. Currently the transport manager is very heavily bound to running the chrome binary internally. Let me see if I can separate the section responsible for running the chrome binary, and the websocket communications. That's a logical division anyways, and the fact that the current implementation kind of smears the two together isn't great. |
I currently worked around the problem by having ChromeController run a script that connects the given |
@nielslaukens - Any chance you could share your implementation either in a fork or as code pasted here in the issue? I started to follow your recommendation but figured it might be less error prone to merely ask for your code. |
I use the script below as follows: chrome_args = [f"--remote={ip}:{args.port}"]
with ChromeController.ChromeContext(binary="./remote-chrome.sh", additional_options=chrome_args) as cr:
... The script itself is pretty simple: It parses out the #!/bin/bash
while [ $# -gt 0 ]; do
case "$1" in
--remote-debugging-port=*) PORT=${1##--remote-debugging-port=};;
--remote=*) REMOTE=${1##--remote=};;
esac;
shift;
done
exec socat TCP-LISTEN:${PORT},fork,reuseaddr TCP:${REMOTE} |
Hi,
I stumbled upon this project, and it looks pretty much what I need. Thank you for sharing your work!
I'm trying to figure out if/how I can connect to an already-running Chrome instance. From what I see in the code, it will always start a new chrome-instance itself.
(The Chrome-instance will be running on a different machine, so it's easier to start it first and connect later)
Thank you,
Niels
The text was updated successfully, but these errors were encountered: