You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
timeout maximum time to wait for in milliseconds. Defaults to 500.
However, I'd like to be able to set the default value globally, do you think this could be possible ?
I haven't found an official way to set it even in puppeteer :(
It would be amazing if we could have control over a global timeout variable for
expect-puppeteer
puppeteer
An example to illustrate my point:
describe('A test with login in page objects', () => {
beforeAll(async () => {
// Have function attached to page reference ?
await page.setGlobalTimeout(30000);
});
it('should display "Google" text on page', async () => {
await page.goto('https://google.com'); // Would use 30 seconds timeout instead of puppeteer default
await expect(page).toMatch('Google'); // Would use 30 seconds timeout instead of 500ms
});
});
The text was updated successfully, but these errors were encountered:
However, I still would like to know if this propagates to native puppeteer functions as well or if its just used for the functions exposed by expect-puppeteer.
It is only used in expect-puppeteer methods. I don't know if Puppeteer provides the same system or not, if not I suggest you to post an issue on Puppeteer project. On our side we already have it.
I see in the documentation in
expect-puppeteer
:However, I'd like to be able to set the default value globally, do you think this could be possible ?
I haven't found an official way to set it even in puppeteer :(
Puppeteer has a partial solution with
page.setDefaultNavigationTimeout()
but it only has effect on a subset of the functions exposed by puppeteer: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagesetdefaultnavigationtimeouttimeoutIt would be amazing if we could have control over a global timeout variable for
An example to illustrate my point:
The text was updated successfully, but these errors were encountered: