docker-robot-framework icon indicating copy to clipboard operation
docker-robot-framework copied to clipboard

Download file dosen't work

Open cisore opened this issue 4 years ago • 1 comments

Describe the bug Hello, First, thank you for the projet. It's very helpfull for me.

I have a projet how download file. But, it's doens't work. The site that I use, open a new tab with de file and firefox download it. But, I don't find it on le docker contenaire ....

cisore avatar Nov 27 '20 09:11 cisore

Here is how to set it in python so you can make it in a volume or put somewhere you want it. You can add this is library or convert to robot framework.

    from selenium import webdriver

    profile = webdriver.FirefoxProfile()
    profile.set_preference("browser.download.folderList", 2)
    profile.set_preference("browser.download.manager.showWhenStarting", False)
    profile.set_preference("pdfjs.disabled", True)
    profile.set_preference("browser.download.dir", 'PATH TO FOLDER')
    profile.set_preference("browser.helperApps.neverAsk.saveToDisk", "application/x-gzip") 
    driver = webdriver.Firefox(firefox_profile=profile)
    driver.get("Name of web site I'm grabbing from")
    driver.find_element_by_xpath("//a[contains(text(), 'DEV.tgz')]").click()

UltimateDogg avatar Dec 10 '20 22:12 UltimateDogg