FAQ: Expected browser binary location, but unable to find binary in default location, no ‘moz:firefoxOptions.binary’ capability provided using GeckoDriver 해결

moz:firefoxOptions.binary

firefox driver Setting

FireFox 브라우저를 이용하여 Selenium실행 시 나오는 에러로 moz:firefoxOptions.binary 에러를 발생합니다.  브라우저 바이너리(파이어폭스 실행화일인 firefox.exe 화일) 위치를 기본 위치에서 찾을 수 없다는 것을 나타냅니다.

분명, 기본 위치에 설치가 되어 있음에도 발생을 하는 경우도 있는데 환경변수 등을 확인해 봐야 합니다. Python을 통해 Selenium의 드라이버 셋팅 시 해당 화일의 위치를 정확하게 기재하면 문제는 해결이 됩니다.

  • options.binary_location : firefox.exe 화일의 위치를 지정한다.
  • Service(‘path’) : geckodriver.exe 드라이버의 위치를 지정한다.
from selenium import webdriver
from selenium.webdriver.chrome.service import Service

options = webdriver.FirefoxOptions()
options.binary_location = r"C:/Program Files/Mozilla Firefox/firefox.exe"

firefox_service = Service('C:/Program Files/Mozilla Firefox/bbs_bigdata/geckodriver.exe)
driver = webdriver.Firefox(options=options, service=firefox_service)
spot_imgspot_img

Subscribe

Related articles

Mary & Josh Win Grammys Newcommers of the Year With Their Debut Album

I actually first read this as alkalizing meaning effecting...

Before Concert Therapy: Breathtaking Barbados Walking Experience

I actually first read this as alkalizing meaning effecting...

Sarah Brooke Shows Off Her Stunning Body in Pre-Concert Photo Shoot

I actually first read this as alkalizing meaning effecting...

These DJs Are Making More Money than Anybody Could Have Ever Guessed

I actually first read this as alkalizing meaning effecting...

Music in Your Car: Mecerdes Offers Astounding Quality Collab Speakers

I actually first read this as alkalizing meaning effecting...
spot_imgspot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here