0

I'm trying to setup Selenium to use with Python on a Mac BigSur, below are the steps I took for my current-fail config.

  1. Install Selenium on my current python environment using pip install selenium
  2. Downloaded MS Edge WebDriver that match my current Edge browser
  3. Save the binary file on /usr/local/bin directory
  4. Run export PATH="$PATH:/usr/local/bin" as suggested in the Selenium website under WebDrivers section
  5. On my Jupyter notebook I have the following code:
from selenium.webdriver import Edge
driver = Edge(executable_path='/usr/local/bin/msedgedriver')
  1. When I run the cell I get the error:
SessionNotCreatedException                Traceback (most recent call last)
<ipython-input-3-eec278095d29> in <module>
      2 URL = 'https://coinmarketcap.com/watchlist/60321ee5b01cab343e1e37d6'
      3 
----> 4 driver = Edge(executable_path='/usr/local/bin/msedgedriver')
      5 
      6 # options = webdriver.edge()

...

SessionNotCreatedException: Message: session not created: No matching capabilities found
  1. Frustrated by ignorance ask help at SO

Do you have any idea what I'm doing wrong?

Ricardo Sanchez
  • 4,935
  • 11
  • 56
  • 86
  • 1
    I agree with art_architect's answer. You need to pass the capabilities to run the code on MAC OS. It seems that an empty one is enough. I also find [a thread](https://stackoverflow.com/questions/62259620/running-edge-browser-on-selenium-in-macos-catalina) with the same issue. You can also refer to it. Please try the solution and tell us about the result. – Yu Zhou Feb 22 '21 at 05:29

1 Answers1

2

Apparently it wants some capabilities. Can you try sending empty ones?

from selenium.webdriver import Edge

caps = {
}

driver = Edge(executable_path='/usr/local/bin/msedgedriver',capabilities=caps )
art_architect
  • 919
  • 6
  • 8