I have tried to do testing with URL of the webpage using Selenium. But, I tried with Google Colaboratory for compiler and Python for programming language. I use this code for starting

from selenium import webdriver

after import webdriver I called Edge webdriver with this code

driver = webdriver.Edge()

but I got error cannot find msedge binary. I am curious, why it's gonna be wrong? what the function of webdriver.Edge() if you must added the location directory of Edge.exe from your computer directory? Can it running automatically without location directory of Edge application? So, URL of the webpage will be opened automatically because the program already running on the Edge

2 Answers 2


The error cannot find msedge binary occurs when the Edge binary is not installed or the path to the Edge binary is not set in the system environment variables. Since you are using Google Colaboratory, it is possible that the Edge browser is not installed on the machine running the code.

To fix the issue, you can try specifying the path to the Edge binary explicitly using the executable_path parameter when creating the webdriver instance. Here's an example:

from selenium import webdriver

options = webdriver.EdgeOptions()
options.use_chromium = True
options.binary_location = '/path/to/msedge.exe'

driver = webdriver.Edge(executable_path='/path/to/msedgedriver.exe', options=options)

Replace the /path/to/msedge.exe and /path/to/msedgedriver.exe with the actual paths to the Edge binary and the Edge webdriver respectively.

Note that the webdriver.Edge() function is used to create an instance of the Edge webdriver, which is used to automate the Edge browser. It does not automatically open a URL in the browser. To open a URL, you need to call the get() method of the webdriver instance, like this:


This will open the URL https://www.example.com in the Edge browser.


You actually need the Edge WebDriver. The Edge browser needs to be installed on the testing machine, but the Edge WebDriver should be installed in your testing project so you can control where it is.

Microsoft has more information about the Edge WebDriver at https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/?tabs=c-sharp (I am not affiliated in any way).

You will need to ensure that your version of the web driver matches your version of Edge or you could get errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.