Testing File Download Functionality - WebdriverIO Wednesdays
Front-end Testing with Kevin
In this WebdriverIO Automated Testing Tutorial, we will be learning how to test the functionality of a file download interface. This is something I've had to do twice recently and figured it was worth sharing.
If you enjoy these videos and would like to support more videos, take a look at my WebdriverIO course to see if it may help you: https://learn.webdriver.io
Or your can show your support with a one-time donation: https://paypal.me/klamping/5
Code: https://github.com/klamping/wdio-downloads
š Links š
Original blog post: https://blog.kevinlamping.com/downloading-files-using-webdriverio/
"The Internet" Test Page Suite http://the-internet.herokuapp.com/download
WebdriverIO 'call' Function http://webdriver.io/api/utility/call.html
NodeJS URL Docs: https://nodejs.org/dist/latest-v8.x/docs/api/url.html
NodeJS Path Docs: https://nodejs.org/dist/latest-v8.x/docs/api/path.html
NodeJS FS Docs: https://nodejs.org/dist/latest-v8.x/docs/api/fs.html
JavaScript 'splice' function: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice
Stack Overflow 'wait for file exists' Q&A: https://stackoverflow.com/questions/26165725/nodejs-check-file-exists-if-not-wait-till-it-exist/47764403#47764403
rmdir
function:
https://gist.github.com/tkihira/2367067
WebdriverIO Wednesdays is a video series going through various WebdriverIO concepts, mainly focused around real-world test scripts. ... https://www.youtube.com/watch?v=9xjBG1775Kk
162551521 Bytes