Your SlideShare is downloading. ×
0
Mark Collin
@Ardesco
http://ardesco.lazerycode.com/
Downloading files,
easy right?
Auto It
•

Different script for each browser

•

Script may break with browser upgrade

•

Windows only

•

Not KISS (Keep...
Browser set to automatically
download files

•

It’s KISS

•

Cross Platform
Let’s look a bit
harder…
We need to check the file, but
we have some problems…
•

Has the file finished downloading?

•

What is the downloaded fil...
Looks like we didn’t keep
it simple after all stupid!
What we need to do
•

We need to make sure that we downloaded the
file or provided useful feedback if we couldn’t

•

We n...
If it’s not in the DOM,
you’re doing it wrong!
Collin’s Law
Downloading Files
•

Don’t click the download link with Selenium!

•

Use a library that is designed to download
remote fi...
Checking downloaded files
•

KISS (Keep It Simple Stupid), don’t try to write
complicated comparison logic!

•

Use the th...
You don’t have to use
Java!
Questions?
Mark Collin
@Ardesco
http://ardesco.lazerycode.com/
What did you just download?
What did you just download?
Upcoming SlideShare
Loading in...5
×

What did you just download?

287

Published on

Presentation about file download tests with Selenium.
Presented at the London Selenium Meetup on 26 Feb 2014

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
287
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "What did you just download?"

  1. 1. Mark Collin @Ardesco http://ardesco.lazerycode.com/
  2. 2. Downloading files, easy right?
  3. 3. Auto It • Different script for each browser • Script may break with browser upgrade • Windows only • Not KISS (Keep It Simple Stupid)
  4. 4. Browser set to automatically download files • It’s KISS • Cross Platform
  5. 5. Let’s look a bit harder…
  6. 6. We need to check the file, but we have some problems… • Has the file finished downloading? • What is the downloaded file called? • The file isn’t there… What happened? • How do we check it’s the right file? • Is the file from this test or the last test?
  7. 7. Looks like we didn’t keep it simple after all stupid!
  8. 8. What we need to do • We need to make sure that we downloaded the file or provided useful feedback if we couldn’t • We need to make sure that the file we downloaded was the correct file
  9. 9. If it’s not in the DOM, you’re doing it wrong! Collin’s Law
  10. 10. Downloading Files • Don’t click the download link with Selenium! • Use a library that is designed to download remote files (Selenium isn’t)
  11. 11. Checking downloaded files • KISS (Keep It Simple Stupid), don’t try to write complicated comparison logic! • Use the thing that everybody uses, a hash! • Save the files if the test fails! We are going to want to look at them.
  12. 12. You don’t have to use Java!
  13. 13. Questions?
  14. 14. Mark Collin @Ardesco http://ardesco.lazerycode.com/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×