Open alissonws opened 3 years ago
Hey @alissonws! its true, it assumes remote is firefox. This is legacy code, and I never worked with remote browsers, but I believe its because at the start the whole project was meant for use with firefox and chrome was added after. As you say, it should work adding the options for chrome.
It would be great if you could come with something for this! maybe there will have to be a remote_chrome and remote_firefox clients?
I think that maybe a better solution would be maintaining chrome
and firefox
clients and adding an argument called remote
. So the user would choose the client and, if needed, it would be set up as remote by parsing remote = True
. I believe that it is a better approach if a requirement of adding more clients comes up (like edge). I could also update the docs to show how to use this option, but it would be nice to know if the client="remote"
is used anywhere else besides __init__()
method. If we would have to rewrite a lot of methods, then we should go for remote_chrome
and remote_firefox
, but if it is just a matter of updating the if client == "remote"
if-block, then I think we should go for client="chrome", remote=True
.
Indeed, I like that solution better! And yes, the client="remote" is only used to configure the browser in the __init__
method. Then it is also used in some example files (new_messages_observer.py
and remote.py
).
Thanks for your contribution!
Pushing this new feature at https://github.com/open-wa/wa-automate-python/pull/80
Hello! First of all, awesome work on this project. It is being really usefull for me. I am migrating my project to Docker and went from
chrome
client toremote
client. I then noticed that there appears to be no support for Chrome since it loads Firefox configurations by default when selectingremote
client.The only thing I'd like to know is if there is for that or it is just a feature that was not added yet. If it is just a matter of adding chrome options and profile to
remote
, I could try do develop something to solve this problem.