Skip to content

Feat/download file puppeteer #1343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Feat/download file puppeteer #1343

wants to merge 4 commits into from

Conversation

kobenguyent
Copy link
Collaborator

  • Introduce download action for puppeteer.
  • test is added.

@DavertMik
Copy link
Contributor

Thanks, a very nice PR but it needs some improvement.
I don't see right now how to use this method.
Let's assume I download a file and I want to check it somehow. Can you give me an example how would you do some testing using file download?
Maybe we will need to use Filesystem helper to fulfil the scenario?

@kobenguyent
Copy link
Collaborator Author

kobenguyent commented Nov 29, 2018

This is basically to click a button, link in AUT to download file. This file is downloaded to output folder. And this function makes sure download function is working on the application.

For instance: you have a web application that let users can upload/ download their images, documents. By using I.downloadFile('locator'), if file is downloaded to output folder, then downloading function is working. Moreover, after file is downloaded, we can do further check with downloaded file if we want, like parsing the pdf and checking contents, etc.

Hope I explain it’s clear ^^

Copy link
Contributor

@DavertMik DavertMik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I had this review as a draft for I think a month now. Unfortunately only now I found out it was not submitted :(

@@ -23,7 +23,8 @@ const path = require('path');
const ElementNotFound = require('./errors/ElementNotFound');
const Popup = require('./extras/Popup');
const Console = require('./extras/Console');

const request = require('request-promise');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

request-promise is outdated. Let's switch to axios

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created another PR to follow up this -> #1542

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants