1 2<!DOCTYPE html> 3<html lang="en"> 4 <head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <link rel="icon" href="./playwright-logo.svg" type="image/svg+xml"> 8 <link rel="manifest" href="./manifest.webmanifest"> 9 <title>Playwright Trace Viewer</title> 10 <script type="module" crossorigin src="./index.FBucu_gE.js"></script> 11 <link rel="modulepreload" crossorigin href="./assets/inspectorTab-B4Iw34Ow.js"> 12 <link rel="modulepreload" crossorigin href="./assets/workbench-DFlGYqou.js"> 13 <link rel="modulepreload" crossorigin href="./assets/testServerConnection-DeE2kSzz.js"> 14 <link rel="stylesheet" crossorigin href="./inspectorTab.DEOUW62d.css"> 15 <link rel="stylesheet" crossorigin href="./workbench.C-zR9ysA.css"> 16 <link rel="stylesheet" crossorigin href="./index.CrbWWHbf.css"> 17 </head> 18 <body> 19 <div id="root"></div> 20 <dialog id="fallback-error"> 21 <p>The Playwright Trace Viewer must be loaded over the <code>http://</code> or <code>https://</code> protocols.</p> 22 <p>For more information, please see the <a href="https://aka.ms/playwright/trace-viewer-file-protocol">docs</a>.</p> 23 </dialog> 24 <script> 25 if (!/^https?:/.test(window.location.protocol)) { 26 const fallbackErrorDialog = document.getElementById('fallback-error'); 27 const isTraceViewerInsidePlaywrightReport = window.location.protocol === 'file:' && window.location.pathname.endsWith('/playwright-report/trace/index.html'); 28 // Best-effort to show the report path in the dialog. 29 if (isTraceViewerInsidePlaywrightReport) { 30 const reportPath = (() => { 31 const base = window.location.pathname.replace(/\/trace\/index\.html$/, ''); 32 if (navigator.platform === 'Win32') 33 return base.replace(/^\//, '').replace(/\//g, '\\\\'); 34 return base; 35 })(); 36 const reportLink = document.createElement('div'); 37 const command = `npx playwright show-report ${reportPath}`; 38 reportLink.innerHTML = `You can open the report via <code>${command}</code> from your Playwright project. <button type="button">Copy Command</button>`; 39 fallbackErrorDialog.insertBefore(reportLink, fallbackErrorDialog.children[1]); 40 reportLink.querySelector('button').addEventListener('click', () => navigator.clipboard.writeText(command)); 41 } 42 fallbackErrorDialog.show(); 43 } 44 </script> 45 </body> 46</html> 47