Skip to content
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

Better debug messages #45

Closed
fawazahmed0 opened this issue Oct 4, 2021 · 6 comments · Fixed by #46
Closed

Better debug messages #45

fawazahmed0 opened this issue Oct 4, 2021 · 6 comments · Fixed by #46
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest

Comments

@fawazahmed0
Copy link
Owner

fawazahmed0 commented Oct 4, 2021

Print better debug/error messages, so that user can easily understand the issue & solve it

@fawazahmed0 fawazahmed0 added enhancement New feature or request good first issue Good for newcomers Hacktoberfest labels Oct 4, 2021
@TueeNguyen
Copy link
Contributor

I'd like to work on this issue, please. Thank you!

@fawazahmed0
Copy link
Owner Author

Hi @TueNguyen2911 , I have assigned this task to you, code is in upload.js

@TueeNguyen
Copy link
Contributor

Thank you, I will look into it

@TueeNguyen
Copy link
Contributor

Hi @fawazahmed0, I took a look but most error messages addressing user's input are clear. Please unassign me from the task

@fawazahmed0
Copy link
Owner Author

Hi @TueNguyen2911 , you can do anything, like for example refactor the code or any other thing to make code better, I will be happy to merge your PR.

For example, you can replace

await page.waitForXPath('//*[contains(text(),"Upload complete")]', { timeout: 0 })
And
await page.waitForXPath('//*[contains(text(),"Upload complete")]', { hidden: true, timeout: 0 })

with

let uploadCompXPath = '//*[contains(text(),"Upload complete")]'
  // Wait for upload to complete
await page.waitForXPath(uploadCompXPath , { timeout: 0 })
  // Wait for upload to go away and processing to start
await page.waitForXPath(uploadCompXPath , { hidden: true, timeout: 0 })

@TueeNguyen
Copy link
Contributor

Hi, thank you for your instructions, I took a look again and submitted a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers Hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants