Merhaba, birkaç gündür bu konuyu araştırıyorum bir sürü yol denedim ama hepsinde farklı farklı hatalarla karşılaştım bir türlü yapamadım.Yapmak istediğim şey (firefox portable’da olabilir) chrome portable tarayıcısını kontrol edebilmek. Daha önce yapan veya yapabilecek olan var mı?
chrome portable : Google Chrome Portable | PortableApps.com
firefox portable : Mozilla Firefox, Portable (browser) | PortableApps.com
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.binary_location = "GoogleChromePortable.exe"
driver = webdriver.Chrome('chromedriver.exe', options=options)
Edit:
Gozden kacırmısım, portable chrome icin path su sekilde olmalı, burası cok onemli “GoogleChromePortable\App\Chrome-bin\chrome.exe”
InvalidArgumentException: invalid argument
(Session info: chrome=88.0.4324.104)
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chromedriverpath='C:\\proje\\chromedriver.exe'
chromePortablePath = 'C:\\proje\\GoogleChromePortable\\App\\Chrome-bin\\chrome.exe'
chromeoptions = Options()
#chromeoptions.add_argument('--incognito')
#options.AddArguments("--start-maximized")
chromeoptions.binary_location = chromePortablePath
driver = webdriver.Chrome(executable_path=chromedriverpath, options=chromeoptions)
driver.get("https://forum.yazbel.com")
sorunsuz calısıyor
Edit: ChromeDriver guncellemesi yaparak denedim, hata verdi sanırım guncel surum ile portable surum uyusmuyor, ChromeDriver 88 veya 87 surumlerini indirip deneyebilirsiniz.