Home > Blockchain >  Why am I getting an error saying 'No module name 'msedge'?
Why am I getting an error saying 'No module name 'msedge'?

Time:05-22

Here is the first half of my code:

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from msedge.selenium_tools import Edge, EdgeOptions

options = EdgeOptions()
options.use_chromium = True
options.add_argument("headless")
options.add_argument("disable-gpu")

driver = webdriver.Edge(executable_path = r"C:\Users\N\Desktop\Automated_Tasks\msedgedriver.exe",options=options) 

When I run the code I get the following error:

ModuleNotFoundError: No module named 'msedge'

CodePudding user response:

sounds like it's not installed....(" pip install msedge-selenium-tools selenium==3.141 ") see here: https://pypi.org/project/msedge-selenium-tools/ If you are using Selenium4 you won't need it, though.

  • Related