I load a custom profile which allows me to download file without
having to click OK each time.
firefox_profile=FirefoxProfile(profile_directory='<...>/8h60h0gu.no-download-dialog')
driver = webdriver.Firefox(firefox_profile=firefox_profile)
Then, I click the download button, the file will be downloaded automatically.
driver.find_element_by_css_selector('input[value="Download"]').click()
Then I try to mv the downloaded file. However, the download will take
some time, so the following command will not work correctly as the
download hasn't been finished when it tries to move the file. I'm
wondering how to wait until the file has been finished and then move
the file. (I don't want to wait for a fixed amount time, as I don't
know how the download will take).
shutil.move(default_download_path, dest)
Does anybody have any suggestions? Thanks!
--
Regards,
Peng
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
--
Regards,
Peng
--
Regards,
Peng