
Are you trying to automate Edge Chromium with Selenium WebDriver using python? And are you trying to use headless mode and change the download path?
If so, you can refer to the steps below. In your code, you're using MicrosoftEdge_8wekyb3d8bbwe
which represents Edge Legacy and it's not right:
- Download the correct version of Edge WebDriver from here. Make sure that the Edge WebDriver version is the same as the Edge browser version.
- Install the MS Edge Selenium tools using command below: pip install msedge-selenium-tools selenium==3.141
from msedge.selenium_tools import Edge, EdgeOptions3. Sample code:
options = EdgeOptions() options.use_chromium = True options.add_experimental_option("prefs", { "download.default_directory": r"C:\Users\Lenovo\Downloads\Swift_help_Resources" }) options.add_argument("headless") options.add_argument("disable-gpu") driver = Edge(executable_path=r"D:\webdriver89\msedgedriver.exe", options=options) driver.get("https://www.seleniumhq.org/download/"); m = driver.find_element_by_link_text("32 bit Windows IE") m.click()
Note: Change the paths in the code to your owns.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Regards,
Yu Zhou