How to use the pre-open chrome window for wappdriver ? #46
-
Everytime I run this program it opens a new window instead of using the pre-existing window which already has Whatsapp logged in. Is there any way to make the program use the pre-existing window? Or is there any other way around? I'm a fresher to intermediate level of programming but, I do have some idea of modules, imports, etc. I havn't worked with chromedriver before. So if there were any silly question by me plz do forgive, but clarify my doubt 😅. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
yes it is possible to use a pre-existing chrome window. But this feature is somewhat hidden in TLDR The best thing is to close any pre-existing window before running code of wappdriver. Now everything will work as planned.Leave WhatsApp. Use Telegram.or RecommendedDont use your personal WhatsApp account for sending messages with WappDriver. Create a seperate account. And now use WappDriver. You will need to scan the QR code only once. It will stay logged in. ( Unless you log-out or use the same WhatsApp account in WhatsApp Web or Desktop app ). That means you will stay logged into two different WhatsApp accounts. One in your normal Chrome ( default user directory ) and another in WappDriver's chrome window. ( this session is stored inside the Deep Understanding:
When you use Suppose you have a WhatsApp in chrome window already open, then please close it first. WhatsApp Web cant run in two places at the same time. Using the Chrome's default folder for wappdriver gives some unpredictable problems. So not recommended. or Answer to your questionOpen the file Now, add this line user: "path/to/default/chrome/profile" Thank you for reading |
Beta Was this translation helpful? Give feedback.
yes it is possible to use a pre-existing chrome window. But this feature is somewhat hidden in
wappdriver
and not recommended to use .TLDR
The best thing is to close any pre-existing window before running code of wappdriver. Now everything will work as planned.
Leave WhatsApp. Use Telegram.
or
Recommended
Dont use your personal WhatsApp account for sending messages with WappDriver. Create a seperate account.
And now use WappDriver. You will need to scan the QR code only once. It will stay logged in. ( Unless you log-out or use the same WhatsApp account in WhatsApp Web or Desktop app ).
That means you will stay logged into two different WhatsApp accounts. One in your normal Chrome ( def…