1

I'm up with python 3.8 and selenium but recently I downloaded the latest edge web driver zip file and runned the mswdedriver.exe from that and typed this code in my ide:

from selenium import webdriver

browser = webdriver.Edge('‪F:\za\python\Assistant\msedgedriver.exe')
browser.maximize_window()
browser.get(url='http://seleniumhq.org/')

but I see this error:

selenium.common.exceptions.WebDriverException: Message: 'MicrosoftEdgeDriver' executable needs to be 
in PATH. Please download from http://go.microsoft.com/fwlink/?LinkId=619687

Can you help me friends? Thanks in advance.

4 Answers 4

2

You need to give a path to the webdriver executable when you load a webdriver, or have it stored as an environment variable:

webdriver.Edge(executable_path="path/to/executable")

A web driver is essentially a special browser application, you must install that application before you can run anything with it.

Here's Edge's web driver download page. Or you can use the link from the error message http://go.microsoft.com/fwlink/?LinkId=619687

Here's a similar question Python Selenium Chrome Webdriver

Sign up to request clarification or add additional context in comments.

3 Comments

If you do not know how to add it to your environment variable it has been answered here: stackoverflow.com/questions/44272416/… If you complete these steps your code will work as is, but if you want add the executable file as the answer states into the webdriver.Edge.
but giving the path as F:\za\python\Assistant\msedgedriver.exe I still see the folowing error selenium.common.exceptions.WebDriverException: Message: 'msedgedriver.exe' executable needs to be in PATH. Please download from http://go.microsoft.com/fwlink/?LinkId=619687
Could you edit your original post to reflect your code change?
0

The backslashes in the executable path need to be escaped, per Python syntax:

browser = webdriver.Edge('‪F:\\za\\python\\Assistant\\msedgedriver.exe')

Comments

0

This problem appears to me you must put in "Bin Folder" the file "MicrosoftWebDriver.exe" as is , edit the previous name of edge webdriver to be "MicrosoftWebDriver.exe" and put it in the "Bin Folder"

Comments

0
  1. You need to download the browser driver from here
  2. After the download completes, extract the driver executable to your preferred location. Add the folder where the executable is located to your PATH environment variable.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.