Skip to main content

Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too.

Here's an example:

link = self.browser.find_element_by_link_text('link text')
href = link.get_attribute('href')
download = self.browser.get(href)
print download
link = self.browser.find_element_by_link_text('link text')
href = link.get_attribute('href')
download = self.browser.get(href)
print download

That fourth line prints "None", presumably because I haven't manually clicked the Save button, and even if I had, I doubt WebDriver would be able to "see" the file.

Any ideas? I'm using Firefox as my browser-under-test, and I understand that the file handling for downloads is somewhat browser and/or OS-specific.

Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too.

Here's an example:

link = self.browser.find_element_by_link_text('link text')
href = link.get_attribute('href')
download = self.browser.get(href)
print download

That fourth line prints "None", presumably because I haven't manually clicked the Save button, and even if I had, I doubt WebDriver would be able to "see" the file.

Any ideas? I'm using Firefox as my browser-under-test, and I understand that the file handling for downloads is somewhat browser and/or OS-specific.

Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too.

Here's an example:

link = self.browser.find_element_by_link_text('link text')
href = link.get_attribute('href')
download = self.browser.get(href)
print download

That fourth line prints "None", presumably because I haven't manually clicked the Save button, and even if I had, I doubt WebDriver would be able to "see" the file.

Any ideas? I'm using Firefox as my browser-under-test, and I understand that the file handling for downloads is somewhat browser and/or OS-specific.

edited body; edited tags
Source Link
JAINAM
  • 1.8k
  • 3
  • 18
  • 39

Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too.

Here's an example:

link = self.browser.find_element_by_link_text('link text')
href = link.get_attribute('href')
download = self.browser.get(href)
print download

That fourth line prints "None", presumably because I haven't manually clicked the Save button, and even if I had, I doubt WebDriver would be able to "see" the file.

Any ideas? I'm using Firefox as my browser-under-test, and I understand that the file handling for downloads is somewhat browser and/or OS specific-specific.

Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too.

Here's an example:

link = self.browser.find_element_by_link_text('link text')
href = link.get_attribute('href')
download = self.browser.get(href)
print download

That fourth line prints "None", presumably because I haven't manually clicked the Save button, and even if I had, I doubt WebDriver would be able to "see" the file.

Any ideas? I'm using Firefox as my browser-under-test, and I understand that the file handling for downloads is somewhat browser and/or OS specific.

Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too.

Here's an example:

link = self.browser.find_element_by_link_text('link text')
href = link.get_attribute('href')
download = self.browser.get(href)
print download

That fourth line prints "None", presumably because I haven't manually clicked the Save button, and even if I had, I doubt WebDriver would be able to "see" the file.

Any ideas? I'm using Firefox as my browser-under-test, and I understand that the file handling for downloads is somewhat browser and/or OS-specific.

modified question
Source Link
Bharat Mane
  • 6.8k
  • 11
  • 41
  • 69
Loading
Question Protected by CommunityBot
modified question
Source Link
Bharat Mane
  • 6.8k
  • 11
  • 41
  • 69
Loading
improved answer
Source Link
Bharat Mane
  • 6.8k
  • 11
  • 41
  • 69
Loading
Tweeted twitter.com/#!/StackSQA/status/180799743528673281
Source Link
Aaron
  • 2.3k
  • 6
  • 25
  • 27
Loading