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

apply un-used custom timeout value and update readme file #317

Closed
wants to merge 1 commit into from

Conversation

showuon
Copy link

@showuon showuon commented Apr 14, 2020

I found there's an un-used option timeout in the option list. In our project, we have an expected long waiting time when testing (ex: load a large script file), and want to custom the timeout value when testing.

Here's what I did:

  1. apply un-used custom timeout value in page.setDefaultTimeout(timeout) after setup
  2. set the default option timeout value to 30 secs to sync with puppeteer's deafult timeout value.
    So, this change won't affect existing user's tests running
  3. update readme file to add timeout option description
  4. add back an accidentally removed(I believe) allowFileAccess option content in readme file (in this PR: added --allow-file-access-from-files tag issue 298 #306)

reference: https://github.com/puppeteer/puppeteer/blob/master/docs/api.md#pagesetdefaulttimeouttimeout
The setDefaultTimeout will change the default maximum time for the following methods and related shortcuts:
page.goBack([options])
page.goForward([options])
page.goto(url[, options])
page.reload([options])
page.setContent(html[, options])
page.waitFor(selectorOrFunctionOrTimeout[, options[, ...args]])
page.waitForFileChooser([options])
page.waitForFunction(pageFunction[, options[, ...args]])
page.waitForNavigation([options])
page.waitForRequest(urlOrPredicate[, options])
page.waitForResponse(urlOrPredicate[, options])
page.waitForSelector(selector[, options])
page.waitForXPath(xpath[, options])

Thank you.

1. apply un-used custom timeout value
2. set the default option timeout value to 30 secs to sync with puppeteer's deafult timeout value.
 So, this change won't affect existing user's tests running
3. update readme file to add timeout option description
4. add back an accidentally removed(I believe) allowFileAccess option content in readme file
@showuon
Copy link
Author

showuon commented Apr 15, 2020

@steveoh , could you please help review this PR? Thank you.

@showuon
Copy link
Author

showuon commented Apr 29, 2020

hi @vladikoff , could you please help review this PR? Thank you.

@vladikoff
Copy link
Member

see #320

@vladikoff vladikoff closed this May 4, 2020
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.

None yet

2 participants