1

I am navigating through the web with python and downloaded some files. However, I do not want to open edge, just want to download the files, but python opens edge automatically. How do I get around this?

Some of my code include:

import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select

driver = webdriver.Edge()

driver.get("myURL")

time.sleep(2)

id_box = driver.find_element(By.ID,"id")

id_box.send_keys("username")

# And much more...
3
  • 1
    Does this answer your question? How to run Microsoft Edge headless with Selenium Python? Commented Jan 20, 2023 at 7:41
  • What do you mean ` I do not want to open edge, just want to download the files`? You do not want to see the browser, but invisible, headless browser will be OK, or you want the download to be performed with some other tool? Commented Jan 20, 2023 at 7:44
  • I have to download multiple files each month, from different websites. Thus I want to open my python program, run the program, and have my files downloaded from edge into respective folders, but I don't want to see multiple tabs of edge open. Edge opening and closing automatically would suffice, but it would be even better to not have to see edge open and close, thus be invisible. Commented Jan 20, 2023 at 8:01

1 Answer 1

0

I think what you want is edge to run "headless". Didn't find a solution using bare selenium. There seems to be a solution at link

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

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.