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
{{ message }}
This repository was archived by the owner on Jun 11, 2021. It is now read-only.
This piece of code will not work when running inside Jest:
constplaywright=require('playwright');try{awaitpage.waitForSelector('.foo');}catch(e){if(einstanceofplaywright.errors.TimeoutError){// Do something if this is a timeout.}}else{console.log(err);}}
It is possible that the TimeoutError is a different instance because Jest test cases is run inside a vm context, whereas PlaywrightRunnerE2E runs in Node.js.
This does work:
if(err.name==='TimeoutError')
Note: Have not tested this with playwright-runner, but just assuming this is a problem here as well since it was with jest-playwright.