How to let WebUi to use my own Chrome instead of the blue Selenium
How to let WebUi to use my own Chrome instead of the blue Selenium?
I want to avoid login problems.
I tried this but it is not working, how to debug it?
CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe" CHROME_USER_DATA="C:\Users\YourUsername\AppData\Local\Google\Chrome\User Data"
I used correct path.
you have to change the settings under "Browser Settings" click on the "use your own browser". It is avaiable in the web ui
I tried this in ubuntu, it's still opening a new browser
I clicked use your own browser, it still open a new browser without session cookie. The same as adarshguptacse18
YourUsername
didnt accidententally leave this as is? Also chrome must be closed
Yes I closed chrome, I use Safari to run the WebUI web interface.
CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe" CHROME_USER_DATA="C:\Users\YourUsername\AppData\Local\Google\Chrome\User Data"
I have YourUsername replaced in my Windows. It is still the same, it opens new browser session.
check whether port 9222 is occupied on your computer. Kill the process pid occupied 9222.
If you don’t know how to do, please ask gpt first
And you can just set CHROME_USER_DATA empty if you want to use own browser
1.for windows
add this to the .env file
CHROME_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe
2.for linux/ubuntu
add this instead
CHROME_PATH=/usr/bin/google-chrome
this path might change depending on how you installed it and the system you use so manually check where the chrome is installed in.
windows alternatives: CHROME_PATH=C:\Program Files (x86)\Google\Chrome\Application\chrome.exe CHROME_PATH=C:\Users{YourUsername}\AppData\Local\Google\Chrome\Application\chrome.exe
linux/ubuntu alternatives: CHROME_PATH=/usr/bin/google-chrome-stable CHROME_PATH=/opt/google/chrome/google-chrome
Thank you so much, it worked now.
"And you can just set CHROME_USER_DATA empty if you want to use own browser” This actually means this don't have this line.
This is my version that worked for me: CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe" CHROME_USER_DATA=""
And for web interface of WebUI, use Firefox.
example:
browser = await playwright.chromium.launch(headless=False, channel="chrome") #using existed chrome browser as webdriver
chrome portable works from https://portableapps.com/
I used:
CHROME_PATH="D:\GoogleChromePortable\GoogleChromePortable.exe"
CHROME_USER_DATA="D:\GoogleChromePortable\Data\profile"
thanks [yinjue] your way works, but I have 3 profiles it opens default one which i dont want to use default for this purpose. when provided path it doesn't take old sessions even through all chrome instance closed .
-> edit(correction): Device macbook It opens last profile chrome which was running not the default. I have commented CHROME_USER_DATA from env
Thank you so much, it worked now.
"And you can just set CHROME_USER_DATA empty if you want to use own browser” This actually means this don't have this line.
This is my version that worked for me: CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe" CHROME_USER_DATA=""
And for web interface of WebUI, use Firefox.
I closed the chrome browser and checked the checkbox for "Use Own Browser". Webui is running on firefox. But it still open blue chromium. I checked port 9222 is empty.
Update:The next day I restarted the windows PC and I found that it used own browser after I checked the checkbox for "Use Own Browser".