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

[Bug]: page.#timeoutSettings is not accessible anymore #8901

Closed
GuillaumeGomez opened this issue Sep 5, 2022 · 6 comments · Fixed by #8903 or #8904
Closed

[Bug]: page.#timeoutSettings is not accessible anymore #8901

GuillaumeGomez opened this issue Sep 5, 2022 · 6 comments · Fixed by #8903 or #8904
Assignees

Comments

@GuillaumeGomez
Copy link
Contributor

Bug description

I used to rely on page._timeoutSettings but it was turned into a private field when upgrading my puppeteer version. Would it be possible to add a getter so I can still get it? I can even make a PR for it if you want.

Thanks in advance!

Puppeteer version

17.1.1

Node.js version

v14.19.3

npm version

6.14.17

What operating system are you seeing the problem on?

Linux, macOS, Windows

Relevant log output

No response

@GuillaumeGomez GuillaumeGomez changed the title [Bug]: page.#timeoutSettings is completely inaccessible [Bug]: page.#timeoutSettings is not accessible anymore Sep 5, 2022
@OrKoN
Copy link
Collaborator

OrKoN commented Sep 5, 2022

Thanks for opening the issue! We were not aware that someone relies on it. Could you please share the use case for getting access to #timeoutSettings? Do you intend to only read existing values or mutate them too?

@GuillaumeGomez
Copy link
Contributor Author

Only reading. My use case is as follow: I need to check multiple attributes (either property, CSS value, attribute) which prevent me from simply relying on puppeteer's page.waitFor* functions . However, I still want to keep the same timeout set by the user.

You can see my use case here.

@OrKoN
Copy link
Collaborator

OrKoN commented Sep 5, 2022

So adding the following getter to the Page would be sufficient?

getDefaultTimeout(): number {
    return this.#timeoutSettings.timeout();
}

@GuillaumeGomez
Copy link
Contributor Author

Absolutely!

@OrKoN
Copy link
Collaborator

OrKoN commented Sep 5, 2022

Sounds good then. I am happy to review a PR or I could add it in the coming days.

@OrKoN OrKoN self-assigned this Sep 5, 2022
@GuillaumeGomez
Copy link
Contributor Author

Sending a PR right away then. Thanks for the quick replies!

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