easytouch-linux 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/.playwright/node/LICENSE +2607 -0
  2. package/.playwright/node/linux-x64/node +0 -0
  3. package/.playwright/package/README.md +3 -0
  4. package/.playwright/package/ThirdPartyNotices.txt +1602 -0
  5. package/.playwright/package/api.json +1 -0
  6. package/.playwright/package/bin/install_media_pack.ps1 +5 -0
  7. package/.playwright/package/bin/reinstall_chrome_beta_linux.sh +42 -0
  8. package/.playwright/package/bin/reinstall_chrome_beta_mac.sh +13 -0
  9. package/.playwright/package/bin/reinstall_chrome_beta_win.ps1 +24 -0
  10. package/.playwright/package/bin/reinstall_chrome_stable_linux.sh +42 -0
  11. package/.playwright/package/bin/reinstall_chrome_stable_mac.sh +12 -0
  12. package/.playwright/package/bin/reinstall_chrome_stable_win.ps1 +24 -0
  13. package/.playwright/package/bin/reinstall_msedge_beta_linux.sh +48 -0
  14. package/.playwright/package/bin/reinstall_msedge_beta_mac.sh +11 -0
  15. package/.playwright/package/bin/reinstall_msedge_beta_win.ps1 +23 -0
  16. package/.playwright/package/bin/reinstall_msedge_dev_linux.sh +48 -0
  17. package/.playwright/package/bin/reinstall_msedge_dev_mac.sh +11 -0
  18. package/.playwright/package/bin/reinstall_msedge_dev_win.ps1 +23 -0
  19. package/.playwright/package/bin/reinstall_msedge_stable_linux.sh +48 -0
  20. package/.playwright/package/bin/reinstall_msedge_stable_mac.sh +11 -0
  21. package/.playwright/package/bin/reinstall_msedge_stable_win.ps1 +24 -0
  22. package/.playwright/package/browsers.json +66 -0
  23. package/.playwright/package/cli.js +18 -0
  24. package/.playwright/package/index.d.ts +17 -0
  25. package/.playwright/package/index.js +33 -0
  26. package/.playwright/package/index.mjs +28 -0
  27. package/.playwright/package/lib/androidServerImpl.js +69 -0
  28. package/.playwright/package/lib/browserServerImpl.js +92 -0
  29. package/.playwright/package/lib/cli/driver.js +95 -0
  30. package/.playwright/package/lib/cli/program.js +583 -0
  31. package/.playwright/package/lib/cli/programWithTestStub.js +67 -0
  32. package/.playwright/package/lib/client/accessibility.js +50 -0
  33. package/.playwright/package/lib/client/android.js +473 -0
  34. package/.playwright/package/lib/client/api.js +285 -0
  35. package/.playwright/package/lib/client/artifact.js +79 -0
  36. package/.playwright/package/lib/client/browser.js +145 -0
  37. package/.playwright/package/lib/client/browserContext.js +559 -0
  38. package/.playwright/package/lib/client/browserType.js +241 -0
  39. package/.playwright/package/lib/client/cdpSession.js +53 -0
  40. package/.playwright/package/lib/client/channelOwner.js +215 -0
  41. package/.playwright/package/lib/client/clientHelper.js +57 -0
  42. package/.playwright/package/lib/client/clientInstrumentation.js +52 -0
  43. package/.playwright/package/lib/client/clock.js +68 -0
  44. package/.playwright/package/lib/client/connection.js +333 -0
  45. package/.playwright/package/lib/client/consoleMessage.js +55 -0
  46. package/.playwright/package/lib/client/coverage.js +41 -0
  47. package/.playwright/package/lib/client/dialog.js +57 -0
  48. package/.playwright/package/lib/client/download.js +62 -0
  49. package/.playwright/package/lib/client/electron.js +135 -0
  50. package/.playwright/package/lib/client/elementHandle.js +321 -0
  51. package/.playwright/package/lib/client/errors.js +77 -0
  52. package/.playwright/package/lib/client/eventEmitter.js +314 -0
  53. package/.playwright/package/lib/client/events.js +94 -0
  54. package/.playwright/package/lib/client/fetch.js +391 -0
  55. package/.playwright/package/lib/client/fileChooser.js +45 -0
  56. package/.playwright/package/lib/client/frame.js +504 -0
  57. package/.playwright/package/lib/client/harRouter.js +99 -0
  58. package/.playwright/package/lib/client/input.js +111 -0
  59. package/.playwright/package/lib/client/jsHandle.js +121 -0
  60. package/.playwright/package/lib/client/jsonPipe.js +35 -0
  61. package/.playwright/package/lib/client/localUtils.js +36 -0
  62. package/.playwright/package/lib/client/locator.js +448 -0
  63. package/.playwright/package/lib/client/network.js +769 -0
  64. package/.playwright/package/lib/client/page.js +748 -0
  65. package/.playwright/package/lib/client/playwright.js +80 -0
  66. package/.playwright/package/lib/client/selectors.js +67 -0
  67. package/.playwright/package/lib/client/stream.js +54 -0
  68. package/.playwright/package/lib/client/tracing.js +147 -0
  69. package/.playwright/package/lib/client/types.js +24 -0
  70. package/.playwright/package/lib/client/video.js +51 -0
  71. package/.playwright/package/lib/client/waiter.js +162 -0
  72. package/.playwright/package/lib/client/webError.js +37 -0
  73. package/.playwright/package/lib/client/worker.js +71 -0
  74. package/.playwright/package/lib/client/writableStream.js +54 -0
  75. package/.playwright/package/lib/common/socksProxy.js +569 -0
  76. package/.playwright/package/lib/common/timeoutSettings.js +73 -0
  77. package/.playwright/package/lib/common/types.js +5 -0
  78. package/.playwright/package/lib/generated/clockSource.js +7 -0
  79. package/.playwright/package/lib/generated/consoleApiSource.js +7 -0
  80. package/.playwright/package/lib/generated/injectedScriptSource.js +7 -0
  81. package/.playwright/package/lib/generated/pollingRecorderSource.js +7 -0
  82. package/.playwright/package/lib/generated/utilityScriptSource.js +7 -0
  83. package/.playwright/package/lib/generated/webSocketMockSource.js +7 -0
  84. package/.playwright/package/lib/image_tools/colorUtils.js +98 -0
  85. package/.playwright/package/lib/image_tools/compare.js +108 -0
  86. package/.playwright/package/lib/image_tools/imageChannel.js +70 -0
  87. package/.playwright/package/lib/image_tools/stats.js +102 -0
  88. package/.playwright/package/lib/inProcessFactory.js +56 -0
  89. package/.playwright/package/lib/inprocess.js +20 -0
  90. package/.playwright/package/lib/outofprocess.js +67 -0
  91. package/.playwright/package/lib/protocol/debug.js +27 -0
  92. package/.playwright/package/lib/protocol/serializers.js +173 -0
  93. package/.playwright/package/lib/protocol/transport.js +82 -0
  94. package/.playwright/package/lib/protocol/validator.js +2780 -0
  95. package/.playwright/package/lib/protocol/validatorPrimitives.js +139 -0
  96. package/.playwright/package/lib/remote/playwrightConnection.js +275 -0
  97. package/.playwright/package/lib/remote/playwrightServer.js +111 -0
  98. package/.playwright/package/lib/server/accessibility.js +62 -0
  99. package/.playwright/package/lib/server/android/android.js +441 -0
  100. package/.playwright/package/lib/server/android/backendAdb.js +172 -0
  101. package/.playwright/package/lib/server/artifact.js +104 -0
  102. package/.playwright/package/lib/server/bidi/bidiBrowser.js +314 -0
  103. package/.playwright/package/lib/server/bidi/bidiChromium.js +124 -0
  104. package/.playwright/package/lib/server/bidi/bidiConnection.js +204 -0
  105. package/.playwright/package/lib/server/bidi/bidiExecutionContext.js +175 -0
  106. package/.playwright/package/lib/server/bidi/bidiFirefox.js +104 -0
  107. package/.playwright/package/lib/server/bidi/bidiInput.js +160 -0
  108. package/.playwright/package/lib/server/bidi/bidiNetworkManager.js +337 -0
  109. package/.playwright/package/lib/server/bidi/bidiOverCdp.js +103 -0
  110. package/.playwright/package/lib/server/bidi/bidiPage.js +518 -0
  111. package/.playwright/package/lib/server/bidi/bidiPdf.js +140 -0
  112. package/.playwright/package/lib/server/bidi/third_party/bidiDeserializer.js +93 -0
  113. package/.playwright/package/lib/server/bidi/third_party/bidiKeyboard.js +240 -0
  114. package/.playwright/package/lib/server/bidi/third_party/bidiProtocol.js +139 -0
  115. package/.playwright/package/lib/server/bidi/third_party/bidiSerializer.js +144 -0
  116. package/.playwright/package/lib/server/bidi/third_party/firefoxPrefs.js +221 -0
  117. package/.playwright/package/lib/server/browser.js +148 -0
  118. package/.playwright/package/lib/server/browserContext.js +675 -0
  119. package/.playwright/package/lib/server/browserType.js +338 -0
  120. package/.playwright/package/lib/server/chromium/appIcon.png +0 -0
  121. package/.playwright/package/lib/server/chromium/chromium.js +354 -0
  122. package/.playwright/package/lib/server/chromium/chromiumSwitches.js +46 -0
  123. package/.playwright/package/lib/server/chromium/crAccessibility.js +237 -0
  124. package/.playwright/package/lib/server/chromium/crBrowser.js +516 -0
  125. package/.playwright/package/lib/server/chromium/crConnection.js +228 -0
  126. package/.playwright/package/lib/server/chromium/crCoverage.js +246 -0
  127. package/.playwright/package/lib/server/chromium/crDevTools.js +104 -0
  128. package/.playwright/package/lib/server/chromium/crDragDrop.js +143 -0
  129. package/.playwright/package/lib/server/chromium/crExecutionContext.js +132 -0
  130. package/.playwright/package/lib/server/chromium/crInput.js +182 -0
  131. package/.playwright/package/lib/server/chromium/crNetworkManager.js +767 -0
  132. package/.playwright/package/lib/server/chromium/crPage.js +1122 -0
  133. package/.playwright/package/lib/server/chromium/crPdf.js +153 -0
  134. package/.playwright/package/lib/server/chromium/crProtocolHelper.js +133 -0
  135. package/.playwright/package/lib/server/chromium/crServiceWorker.js +112 -0
  136. package/.playwright/package/lib/server/chromium/defaultFontFamilies.js +145 -0
  137. package/.playwright/package/lib/server/chromium/videoRecorder.js +155 -0
  138. package/.playwright/package/lib/server/clock.js +125 -0
  139. package/.playwright/package/lib/server/codegen/csharp.js +304 -0
  140. package/.playwright/package/lib/server/codegen/java.js +243 -0
  141. package/.playwright/package/lib/server/codegen/javascript.js +253 -0
  142. package/.playwright/package/lib/server/codegen/jsonl.js +47 -0
  143. package/.playwright/package/lib/server/codegen/language.js +88 -0
  144. package/.playwright/package/lib/server/codegen/languages.js +30 -0
  145. package/.playwright/package/lib/server/codegen/python.js +262 -0
  146. package/.playwright/package/lib/server/codegen/types.js +5 -0
  147. package/.playwright/package/lib/server/console.js +57 -0
  148. package/.playwright/package/lib/server/cookieStore.js +185 -0
  149. package/.playwright/package/lib/server/debugController.js +212 -0
  150. package/.playwright/package/lib/server/debugger.js +132 -0
  151. package/.playwright/package/lib/server/deviceDescriptors.js +26 -0
  152. package/.playwright/package/lib/server/deviceDescriptorsSource.json +1669 -0
  153. package/.playwright/package/lib/server/dialog.js +71 -0
  154. package/.playwright/package/lib/server/dispatchers/androidDispatcher.js +204 -0
  155. package/.playwright/package/lib/server/dispatchers/artifactDispatcher.js +118 -0
  156. package/.playwright/package/lib/server/dispatchers/browserContextDispatcher.js +357 -0
  157. package/.playwright/package/lib/server/dispatchers/browserDispatcher.js +170 -0
  158. package/.playwright/package/lib/server/dispatchers/browserTypeDispatcher.js +55 -0
  159. package/.playwright/package/lib/server/dispatchers/cdpSessionDispatcher.js +48 -0
  160. package/.playwright/package/lib/server/dispatchers/debugControllerDispatcher.js +105 -0
  161. package/.playwright/package/lib/server/dispatchers/dialogDispatcher.js +44 -0
  162. package/.playwright/package/lib/server/dispatchers/dispatcher.js +395 -0
  163. package/.playwright/package/lib/server/dispatchers/electronDispatcher.js +93 -0
  164. package/.playwright/package/lib/server/dispatchers/elementHandlerDispatcher.js +228 -0
  165. package/.playwright/package/lib/server/dispatchers/frameDispatcher.js +294 -0
  166. package/.playwright/package/lib/server/dispatchers/jsHandleDispatcher.js +97 -0
  167. package/.playwright/package/lib/server/dispatchers/jsonPipeDispatcher.js +59 -0
  168. package/.playwright/package/lib/server/dispatchers/localUtilsDispatcher.js +413 -0
  169. package/.playwright/package/lib/server/dispatchers/networkDispatchers.js +221 -0
  170. package/.playwright/package/lib/server/dispatchers/pageDispatcher.js +367 -0
  171. package/.playwright/package/lib/server/dispatchers/playwrightDispatcher.js +107 -0
  172. package/.playwright/package/lib/server/dispatchers/selectorsDispatcher.js +36 -0
  173. package/.playwright/package/lib/server/dispatchers/streamDispatcher.js +62 -0
  174. package/.playwright/package/lib/server/dispatchers/tracingDispatcher.js +64 -0
  175. package/.playwright/package/lib/server/dispatchers/webSocketRouteDispatcher.js +188 -0
  176. package/.playwright/package/lib/server/dispatchers/writableStreamDispatcher.js +58 -0
  177. package/.playwright/package/lib/server/dom.js +893 -0
  178. package/.playwright/package/lib/server/download.js +60 -0
  179. package/.playwright/package/lib/server/electron/electron.js +296 -0
  180. package/.playwright/package/lib/server/electron/loader.js +57 -0
  181. package/.playwright/package/lib/server/errors.js +68 -0
  182. package/.playwright/package/lib/server/fetch.js +663 -0
  183. package/.playwright/package/lib/server/fileChooser.js +42 -0
  184. package/.playwright/package/lib/server/fileUploadUtils.js +75 -0
  185. package/.playwright/package/lib/server/firefox/ffAccessibility.js +216 -0
  186. package/.playwright/package/lib/server/firefox/ffBrowser.js +462 -0
  187. package/.playwright/package/lib/server/firefox/ffConnection.js +168 -0
  188. package/.playwright/package/lib/server/firefox/ffExecutionContext.js +123 -0
  189. package/.playwright/package/lib/server/firefox/ffInput.js +161 -0
  190. package/.playwright/package/lib/server/firefox/ffNetworkManager.js +233 -0
  191. package/.playwright/package/lib/server/firefox/ffPage.js +544 -0
  192. package/.playwright/package/lib/server/firefox/firefox.js +99 -0
  193. package/.playwright/package/lib/server/formData.js +75 -0
  194. package/.playwright/package/lib/server/frameSelectors.js +171 -0
  195. package/.playwright/package/lib/server/frames.js +1663 -0
  196. package/.playwright/package/lib/server/har/harRecorder.js +139 -0
  197. package/.playwright/package/lib/server/har/harTracer.js +542 -0
  198. package/.playwright/package/lib/server/helper.js +103 -0
  199. package/.playwright/package/lib/server/index.js +108 -0
  200. package/.playwright/package/lib/server/input.js +309 -0
  201. package/.playwright/package/lib/server/instrumentation.js +70 -0
  202. package/.playwright/package/lib/server/isomorphic/utilityScriptSerializers.js +226 -0
  203. package/.playwright/package/lib/server/javascript.js +293 -0
  204. package/.playwright/package/lib/server/launchApp.js +91 -0
  205. package/.playwright/package/lib/server/macEditingCommands.js +139 -0
  206. package/.playwright/package/lib/server/network.js +617 -0
  207. package/.playwright/package/lib/server/page.js +863 -0
  208. package/.playwright/package/lib/server/pipeTransport.js +85 -0
  209. package/.playwright/package/lib/server/playwright.js +88 -0
  210. package/.playwright/package/lib/server/progress.js +99 -0
  211. package/.playwright/package/lib/server/protocolError.js +49 -0
  212. package/.playwright/package/lib/server/recorder/chat.js +177 -0
  213. package/.playwright/package/lib/server/recorder/contextRecorder.js +290 -0
  214. package/.playwright/package/lib/server/recorder/recorderApp.js +187 -0
  215. package/.playwright/package/lib/server/recorder/recorderCollection.js +104 -0
  216. package/.playwright/package/lib/server/recorder/recorderFrontend.js +5 -0
  217. package/.playwright/package/lib/server/recorder/recorderRunner.js +159 -0
  218. package/.playwright/package/lib/server/recorder/recorderUtils.js +89 -0
  219. package/.playwright/package/lib/server/recorder/throttledFile.js +46 -0
  220. package/.playwright/package/lib/server/recorder.js +367 -0
  221. package/.playwright/package/lib/server/registry/browserFetcher.js +168 -0
  222. package/.playwright/package/lib/server/registry/dependencies.js +322 -0
  223. package/.playwright/package/lib/server/registry/index.js +1165 -0
  224. package/.playwright/package/lib/server/registry/nativeDeps.js +496 -0
  225. package/.playwright/package/lib/server/registry/oopDownloadBrowserMain.js +138 -0
  226. package/.playwright/package/lib/server/screenshotter.js +348 -0
  227. package/.playwright/package/lib/server/selectors.js +73 -0
  228. package/.playwright/package/lib/server/socksClientCertificatesInterceptor.js +340 -0
  229. package/.playwright/package/lib/server/socksInterceptor.js +100 -0
  230. package/.playwright/package/lib/server/trace/recorder/snapshotter.js +161 -0
  231. package/.playwright/package/lib/server/trace/recorder/snapshotterInjected.js +518 -0
  232. package/.playwright/package/lib/server/trace/recorder/tracing.js +596 -0
  233. package/.playwright/package/lib/server/trace/test/inMemorySnapshotter.js +93 -0
  234. package/.playwright/package/lib/server/trace/viewer/traceViewer.js +219 -0
  235. package/.playwright/package/lib/server/transport.js +192 -0
  236. package/.playwright/package/lib/server/types.js +24 -0
  237. package/.playwright/package/lib/server/usKeyboardLayout.js +555 -0
  238. package/.playwright/package/lib/server/webkit/webkit.js +87 -0
  239. package/.playwright/package/lib/server/webkit/wkAccessibility.js +194 -0
  240. package/.playwright/package/lib/server/webkit/wkBrowser.js +329 -0
  241. package/.playwright/package/lib/server/webkit/wkConnection.js +173 -0
  242. package/.playwright/package/lib/server/webkit/wkExecutionContext.js +131 -0
  243. package/.playwright/package/lib/server/webkit/wkInput.js +179 -0
  244. package/.playwright/package/lib/server/webkit/wkInterceptableRequest.js +162 -0
  245. package/.playwright/package/lib/server/webkit/wkPage.js +1207 -0
  246. package/.playwright/package/lib/server/webkit/wkProvisionalPage.js +94 -0
  247. package/.playwright/package/lib/server/webkit/wkWorkers.js +104 -0
  248. package/.playwright/package/lib/third_party/pixelmatch.js +255 -0
  249. package/.playwright/package/lib/utils/ascii.js +31 -0
  250. package/.playwright/package/lib/utils/comparators.js +159 -0
  251. package/.playwright/package/lib/utils/crypto.js +171 -0
  252. package/.playwright/package/lib/utils/debug.js +46 -0
  253. package/.playwright/package/lib/utils/debugLogger.js +93 -0
  254. package/.playwright/package/lib/utils/env.js +49 -0
  255. package/.playwright/package/lib/utils/eventsHelper.js +38 -0
  256. package/.playwright/package/lib/utils/expectUtils.js +33 -0
  257. package/.playwright/package/lib/utils/fileUtils.js +205 -0
  258. package/.playwright/package/lib/utils/happy-eyeballs.js +194 -0
  259. package/.playwright/package/lib/utils/headers.js +52 -0
  260. package/.playwright/package/lib/utils/hostPlatform.js +145 -0
  261. package/.playwright/package/lib/utils/httpServer.js +233 -0
  262. package/.playwright/package/lib/utils/index.js +368 -0
  263. package/.playwright/package/lib/utils/isomorphic/ariaSnapshot.js +391 -0
  264. package/.playwright/package/lib/utils/isomorphic/cssParser.js +250 -0
  265. package/.playwright/package/lib/utils/isomorphic/cssTokenizer.js +979 -0
  266. package/.playwright/package/lib/utils/isomorphic/locatorGenerators.js +660 -0
  267. package/.playwright/package/lib/utils/isomorphic/locatorParser.js +185 -0
  268. package/.playwright/package/lib/utils/isomorphic/locatorUtils.js +62 -0
  269. package/.playwright/package/lib/utils/isomorphic/mimeType.js +29 -0
  270. package/.playwright/package/lib/utils/isomorphic/selectorParser.js +397 -0
  271. package/.playwright/package/lib/utils/isomorphic/stringUtils.js +169 -0
  272. package/.playwright/package/lib/utils/isomorphic/traceUtils.js +39 -0
  273. package/.playwright/package/lib/utils/isomorphic/urlMatch.js +122 -0
  274. package/.playwright/package/lib/utils/linuxUtils.js +78 -0
  275. package/.playwright/package/lib/utils/manualPromise.js +109 -0
  276. package/.playwright/package/lib/utils/multimap.js +75 -0
  277. package/.playwright/package/lib/utils/network.js +160 -0
  278. package/.playwright/package/lib/utils/processLauncher.js +248 -0
  279. package/.playwright/package/lib/utils/profiler.js +53 -0
  280. package/.playwright/package/lib/utils/rtti.js +44 -0
  281. package/.playwright/package/lib/utils/semaphore.js +51 -0
  282. package/.playwright/package/lib/utils/sequence.js +64 -0
  283. package/.playwright/package/lib/utils/spawnAsync.js +45 -0
  284. package/.playwright/package/lib/utils/stackTrace.js +134 -0
  285. package/.playwright/package/lib/utils/task.js +58 -0
  286. package/.playwright/package/lib/utils/time.js +37 -0
  287. package/.playwright/package/lib/utils/timeoutRunner.js +66 -0
  288. package/.playwright/package/lib/utils/traceUtils.js +44 -0
  289. package/.playwright/package/lib/utils/userAgent.js +105 -0
  290. package/.playwright/package/lib/utils/wsServer.js +128 -0
  291. package/.playwright/package/lib/utils/zipFile.js +75 -0
  292. package/.playwright/package/lib/utils/zones.js +69 -0
  293. package/.playwright/package/lib/utilsBundle.js +81 -0
  294. package/.playwright/package/lib/utilsBundleImpl/index.js +210 -0
  295. package/.playwright/package/lib/utilsBundleImpl/xdg-open +1066 -0
  296. package/.playwright/package/lib/vite/htmlReport/index.html +69 -0
  297. package/.playwright/package/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +1 -0
  298. package/.playwright/package/lib/vite/recorder/assets/codeMirrorModule-k-61wZCK.js +24 -0
  299. package/.playwright/package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  300. package/.playwright/package/lib/vite/recorder/assets/index-B70BEW3b.js +184 -0
  301. package/.playwright/package/lib/vite/recorder/assets/index-eHBmevrY.css +1 -0
  302. package/.playwright/package/lib/vite/recorder/index.html +29 -0
  303. package/.playwright/package/lib/vite/recorder/playwright-logo.svg +9 -0
  304. package/.playwright/package/lib/vite/traceViewer/assets/codeMirrorModule-CyuxU5C-.js +24 -0
  305. package/.playwright/package/lib/vite/traceViewer/assets/defaultSettingsView-5nVJRt0A.js +243 -0
  306. package/.playwright/package/lib/vite/traceViewer/assets/xtermModule-c-SNdYZy.js +9 -0
  307. package/.playwright/package/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +1 -0
  308. package/.playwright/package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  309. package/.playwright/package/lib/vite/traceViewer/defaultSettingsView.2xeEXCXv.css +1 -0
  310. package/.playwright/package/lib/vite/traceViewer/index.CFOW-Ezb.css +1 -0
  311. package/.playwright/package/lib/vite/traceViewer/index.html +43 -0
  312. package/.playwright/package/lib/vite/traceViewer/index.qVn2ZnpC.js +2 -0
  313. package/.playwright/package/lib/vite/traceViewer/playwright-logo.svg +9 -0
  314. package/.playwright/package/lib/vite/traceViewer/snapshot.html +21 -0
  315. package/.playwright/package/lib/vite/traceViewer/sw.bundle.js +3 -0
  316. package/.playwright/package/lib/vite/traceViewer/uiMode.BatfzHMG.css +1 -0
  317. package/.playwright/package/lib/vite/traceViewer/uiMode.html +17 -0
  318. package/.playwright/package/lib/vite/traceViewer/uiMode.m4IPRPOd.js +5 -0
  319. package/.playwright/package/lib/vite/traceViewer/xtermModule.Beg8tuEN.css +32 -0
  320. package/.playwright/package/lib/zipBundle.js +25 -0
  321. package/.playwright/package/lib/zipBundleImpl.js +5 -0
  322. package/.playwright/package/package.json +44 -0
  323. package/.playwright/package/protocol.yml +3758 -0
  324. package/.playwright/package/types/protocol.d.ts +21868 -0
  325. package/.playwright/package/types/structs.d.ts +45 -0
  326. package/.playwright/package/types/types.d.ts +22663 -0
  327. package/README.md +6 -6
  328. package/et +0 -0
  329. package/package.json +7 -2
  330. package/playwright.ps1 +7 -0
  331. package/scripts/playwright-bridge.js +560 -0
@@ -0,0 +1,748 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Page = exports.BindingCall = void 0;
7
+ var _fs = _interopRequireDefault(require("fs"));
8
+ var _path = _interopRequireDefault(require("path"));
9
+ var _errors = require("./errors");
10
+ var _timeoutSettings = require("../common/timeoutSettings");
11
+ var _utils = require("../utils");
12
+ var _accessibility = require("./accessibility");
13
+ var _artifact = require("./artifact");
14
+ var _channelOwner = require("./channelOwner");
15
+ var _clientHelper = require("./clientHelper");
16
+ var _coverage = require("./coverage");
17
+ var _download = require("./download");
18
+ var _elementHandle = require("./elementHandle");
19
+ var _events = require("./events");
20
+ var _fileChooser = require("./fileChooser");
21
+ var _frame = require("./frame");
22
+ var _input = require("./input");
23
+ var _jsHandle = require("./jsHandle");
24
+ var _network = require("./network");
25
+ var _video = require("./video");
26
+ var _waiter = require("./waiter");
27
+ var _worker = require("./worker");
28
+ var _harRouter = require("./harRouter");
29
+ let _Symbol$asyncDispose;
30
+ /**
31
+ * Copyright 2017 Google Inc. All rights reserved.
32
+ * Modifications copyright (c) Microsoft Corporation.
33
+ *
34
+ * Licensed under the Apache License, Version 2.0 (the "License");
35
+ * you may not use this file except in compliance with the License.
36
+ * You may obtain a copy of the License at
37
+ *
38
+ * http://www.apache.org/licenses/LICENSE-2.0
39
+ *
40
+ * Unless required by applicable law or agreed to in writing, software
41
+ * distributed under the License is distributed on an "AS IS" BASIS,
42
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
43
+ * See the License for the specific language governing permissions and
44
+ * limitations under the License.
45
+ */
46
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
47
+ _Symbol$asyncDispose = Symbol.asyncDispose;
48
+ class Page extends _channelOwner.ChannelOwner {
49
+ static from(page) {
50
+ return page._object;
51
+ }
52
+ static fromNullable(page) {
53
+ return page ? Page.from(page) : null;
54
+ }
55
+ constructor(parent, type, guid, initializer) {
56
+ super(parent, type, guid, initializer);
57
+ this._browserContext = void 0;
58
+ this._ownedContext = void 0;
59
+ this._mainFrame = void 0;
60
+ this._frames = new Set();
61
+ this._workers = new Set();
62
+ this._closed = false;
63
+ this._closedOrCrashedScope = new _utils.LongStandingScope();
64
+ this._viewportSize = void 0;
65
+ this._routes = [];
66
+ this._webSocketRoutes = [];
67
+ this.accessibility = void 0;
68
+ this.coverage = void 0;
69
+ this.keyboard = void 0;
70
+ this.mouse = void 0;
71
+ this.request = void 0;
72
+ this.touchscreen = void 0;
73
+ this.clock = void 0;
74
+ this._bindings = new Map();
75
+ this._timeoutSettings = void 0;
76
+ this._video = null;
77
+ this._opener = void 0;
78
+ this._closeReason = void 0;
79
+ this._closeWasCalled = false;
80
+ this._harRouters = [];
81
+ this._locatorHandlers = new Map();
82
+ this._browserContext = parent;
83
+ this._timeoutSettings = new _timeoutSettings.TimeoutSettings(this._browserContext._timeoutSettings);
84
+ this.accessibility = new _accessibility.Accessibility(this._channel);
85
+ this.keyboard = new _input.Keyboard(this);
86
+ this.mouse = new _input.Mouse(this);
87
+ this.request = this._browserContext.request;
88
+ this.touchscreen = new _input.Touchscreen(this);
89
+ this.clock = this._browserContext.clock;
90
+ this._mainFrame = _frame.Frame.from(initializer.mainFrame);
91
+ this._mainFrame._page = this;
92
+ this._frames.add(this._mainFrame);
93
+ this._viewportSize = initializer.viewportSize || null;
94
+ this._closed = initializer.isClosed;
95
+ this._opener = Page.fromNullable(initializer.opener);
96
+ this._channel.on('bindingCall', ({
97
+ binding
98
+ }) => this._onBinding(BindingCall.from(binding)));
99
+ this._channel.on('close', () => this._onClose());
100
+ this._channel.on('crash', () => this._onCrash());
101
+ this._channel.on('download', ({
102
+ url,
103
+ suggestedFilename,
104
+ artifact
105
+ }) => {
106
+ const artifactObject = _artifact.Artifact.from(artifact);
107
+ this.emit(_events.Events.Page.Download, new _download.Download(this, url, suggestedFilename, artifactObject));
108
+ });
109
+ this._channel.on('fileChooser', ({
110
+ element,
111
+ isMultiple
112
+ }) => this.emit(_events.Events.Page.FileChooser, new _fileChooser.FileChooser(this, _elementHandle.ElementHandle.from(element), isMultiple)));
113
+ this._channel.on('frameAttached', ({
114
+ frame
115
+ }) => this._onFrameAttached(_frame.Frame.from(frame)));
116
+ this._channel.on('frameDetached', ({
117
+ frame
118
+ }) => this._onFrameDetached(_frame.Frame.from(frame)));
119
+ this._channel.on('locatorHandlerTriggered', ({
120
+ uid
121
+ }) => this._onLocatorHandlerTriggered(uid));
122
+ this._channel.on('route', ({
123
+ route
124
+ }) => this._onRoute(_network.Route.from(route)));
125
+ this._channel.on('webSocketRoute', ({
126
+ webSocketRoute
127
+ }) => this._onWebSocketRoute(_network.WebSocketRoute.from(webSocketRoute)));
128
+ this._channel.on('video', ({
129
+ artifact
130
+ }) => {
131
+ const artifactObject = _artifact.Artifact.from(artifact);
132
+ this._forceVideo()._artifactReady(artifactObject);
133
+ });
134
+ this._channel.on('webSocket', ({
135
+ webSocket
136
+ }) => this.emit(_events.Events.Page.WebSocket, _network.WebSocket.from(webSocket)));
137
+ this._channel.on('worker', ({
138
+ worker
139
+ }) => this._onWorker(_worker.Worker.from(worker)));
140
+ this.coverage = new _coverage.Coverage(this._channel);
141
+ this.once(_events.Events.Page.Close, () => this._closedOrCrashedScope.close(this._closeErrorWithReason()));
142
+ this.once(_events.Events.Page.Crash, () => this._closedOrCrashedScope.close(new _errors.TargetClosedError()));
143
+ this._setEventToSubscriptionMapping(new Map([[_events.Events.Page.Console, 'console'], [_events.Events.Page.Dialog, 'dialog'], [_events.Events.Page.Request, 'request'], [_events.Events.Page.Response, 'response'], [_events.Events.Page.RequestFinished, 'requestFinished'], [_events.Events.Page.RequestFailed, 'requestFailed'], [_events.Events.Page.FileChooser, 'fileChooser']]));
144
+ }
145
+ _onFrameAttached(frame) {
146
+ frame._page = this;
147
+ this._frames.add(frame);
148
+ if (frame._parentFrame) frame._parentFrame._childFrames.add(frame);
149
+ this.emit(_events.Events.Page.FrameAttached, frame);
150
+ }
151
+ _onFrameDetached(frame) {
152
+ this._frames.delete(frame);
153
+ frame._detached = true;
154
+ if (frame._parentFrame) frame._parentFrame._childFrames.delete(frame);
155
+ this.emit(_events.Events.Page.FrameDetached, frame);
156
+ }
157
+ async _onRoute(route) {
158
+ route._context = this.context();
159
+ const routeHandlers = this._routes.slice();
160
+ for (const routeHandler of routeHandlers) {
161
+ // If the page was closed we stall all requests right away.
162
+ if (this._closeWasCalled || this._browserContext._closeWasCalled) return;
163
+ if (!routeHandler.matches(route.request().url())) continue;
164
+ const index = this._routes.indexOf(routeHandler);
165
+ if (index === -1) continue;
166
+ if (routeHandler.willExpire()) this._routes.splice(index, 1);
167
+ const handled = await routeHandler.handle(route);
168
+ if (!this._routes.length) this._wrapApiCall(() => this._updateInterceptionPatterns(), true).catch(() => {});
169
+ if (handled) return;
170
+ }
171
+ await this._browserContext._onRoute(route);
172
+ }
173
+ async _onWebSocketRoute(webSocketRoute) {
174
+ const routeHandler = this._webSocketRoutes.find(route => route.matches(webSocketRoute.url()));
175
+ if (routeHandler) await routeHandler.handle(webSocketRoute);else await this._browserContext._onWebSocketRoute(webSocketRoute);
176
+ }
177
+ async _onBinding(bindingCall) {
178
+ const func = this._bindings.get(bindingCall._initializer.name);
179
+ if (func) {
180
+ await bindingCall.call(func);
181
+ return;
182
+ }
183
+ await this._browserContext._onBinding(bindingCall);
184
+ }
185
+ _onWorker(worker) {
186
+ this._workers.add(worker);
187
+ worker._page = this;
188
+ this.emit(_events.Events.Page.Worker, worker);
189
+ }
190
+ _onClose() {
191
+ this._closed = true;
192
+ this._browserContext._pages.delete(this);
193
+ this._browserContext._backgroundPages.delete(this);
194
+ this._disposeHarRouters();
195
+ this.emit(_events.Events.Page.Close, this);
196
+ }
197
+ _onCrash() {
198
+ this.emit(_events.Events.Page.Crash, this);
199
+ }
200
+ context() {
201
+ return this._browserContext;
202
+ }
203
+ async opener() {
204
+ if (!this._opener || this._opener.isClosed()) return null;
205
+ return this._opener;
206
+ }
207
+ mainFrame() {
208
+ return this._mainFrame;
209
+ }
210
+ frame(frameSelector) {
211
+ const name = (0, _utils.isString)(frameSelector) ? frameSelector : frameSelector.name;
212
+ const url = (0, _utils.isObject)(frameSelector) ? frameSelector.url : undefined;
213
+ (0, _utils.assert)(name || url, 'Either name or url matcher should be specified');
214
+ return this.frames().find(f => {
215
+ if (name) return f.name() === name;
216
+ return (0, _utils.urlMatches)(this._browserContext._options.baseURL, f.url(), url);
217
+ }) || null;
218
+ }
219
+ frames() {
220
+ return [...this._frames];
221
+ }
222
+ setDefaultNavigationTimeout(timeout) {
223
+ this._timeoutSettings.setDefaultNavigationTimeout(timeout);
224
+ this._wrapApiCall(async () => {
225
+ this._channel.setDefaultNavigationTimeoutNoReply({
226
+ timeout
227
+ }).catch(() => {});
228
+ }, true);
229
+ }
230
+ setDefaultTimeout(timeout) {
231
+ this._timeoutSettings.setDefaultTimeout(timeout);
232
+ this._wrapApiCall(async () => {
233
+ this._channel.setDefaultTimeoutNoReply({
234
+ timeout
235
+ }).catch(() => {});
236
+ }, true);
237
+ }
238
+ _forceVideo() {
239
+ if (!this._video) this._video = new _video.Video(this, this._connection);
240
+ return this._video;
241
+ }
242
+ video() {
243
+ // Note: we are creating Video object lazily, because we do not know
244
+ // BrowserContextOptions when constructing the page - it is assigned
245
+ // too late during launchPersistentContext.
246
+ if (!this._browserContext._options.recordVideo) return null;
247
+ return this._forceVideo();
248
+ }
249
+ async $(selector, options) {
250
+ return await this._mainFrame.$(selector, options);
251
+ }
252
+ async waitForSelector(selector, options) {
253
+ return await this._mainFrame.waitForSelector(selector, options);
254
+ }
255
+ async dispatchEvent(selector, type, eventInit, options) {
256
+ return await this._mainFrame.dispatchEvent(selector, type, eventInit, options);
257
+ }
258
+ async evaluateHandle(pageFunction, arg) {
259
+ (0, _jsHandle.assertMaxArguments)(arguments.length, 2);
260
+ return await this._mainFrame.evaluateHandle(pageFunction, arg);
261
+ }
262
+ async $eval(selector, pageFunction, arg) {
263
+ (0, _jsHandle.assertMaxArguments)(arguments.length, 3);
264
+ return await this._mainFrame.$eval(selector, pageFunction, arg);
265
+ }
266
+ async $$eval(selector, pageFunction, arg) {
267
+ (0, _jsHandle.assertMaxArguments)(arguments.length, 3);
268
+ return await this._mainFrame.$$eval(selector, pageFunction, arg);
269
+ }
270
+ async $$(selector) {
271
+ return await this._mainFrame.$$(selector);
272
+ }
273
+ async addScriptTag(options = {}) {
274
+ return await this._mainFrame.addScriptTag(options);
275
+ }
276
+ async addStyleTag(options = {}) {
277
+ return await this._mainFrame.addStyleTag(options);
278
+ }
279
+ async exposeFunction(name, callback) {
280
+ await this._channel.exposeBinding({
281
+ name
282
+ });
283
+ const binding = (source, ...args) => callback(...args);
284
+ this._bindings.set(name, binding);
285
+ }
286
+ async exposeBinding(name, callback, options = {}) {
287
+ await this._channel.exposeBinding({
288
+ name,
289
+ needsHandle: options.handle
290
+ });
291
+ this._bindings.set(name, callback);
292
+ }
293
+ async setExtraHTTPHeaders(headers) {
294
+ (0, _network.validateHeaders)(headers);
295
+ await this._channel.setExtraHTTPHeaders({
296
+ headers: (0, _utils.headersObjectToArray)(headers)
297
+ });
298
+ }
299
+ url() {
300
+ return this._mainFrame.url();
301
+ }
302
+ async content() {
303
+ return await this._mainFrame.content();
304
+ }
305
+ async setContent(html, options) {
306
+ return await this._mainFrame.setContent(html, options);
307
+ }
308
+ async goto(url, options) {
309
+ return await this._mainFrame.goto(url, options);
310
+ }
311
+ async reload(options = {}) {
312
+ const waitUntil = (0, _frame.verifyLoadState)('waitUntil', options.waitUntil === undefined ? 'load' : options.waitUntil);
313
+ return _network.Response.fromNullable((await this._channel.reload({
314
+ ...options,
315
+ waitUntil
316
+ })).response);
317
+ }
318
+ async addLocatorHandler(locator, handler, options = {}) {
319
+ if (locator._frame !== this._mainFrame) throw new Error(`Locator must belong to the main frame of this page`);
320
+ if (options.times === 0) return;
321
+ const {
322
+ uid
323
+ } = await this._channel.registerLocatorHandler({
324
+ selector: locator._selector,
325
+ noWaitAfter: options.noWaitAfter
326
+ });
327
+ this._locatorHandlers.set(uid, {
328
+ locator,
329
+ handler,
330
+ times: options.times
331
+ });
332
+ }
333
+ async _onLocatorHandlerTriggered(uid) {
334
+ let remove = false;
335
+ try {
336
+ const handler = this._locatorHandlers.get(uid);
337
+ if (handler && handler.times !== 0) {
338
+ if (handler.times !== undefined) handler.times--;
339
+ await handler.handler(handler.locator);
340
+ }
341
+ remove = (handler === null || handler === void 0 ? void 0 : handler.times) === 0;
342
+ } finally {
343
+ if (remove) this._locatorHandlers.delete(uid);
344
+ this._wrapApiCall(() => this._channel.resolveLocatorHandlerNoReply({
345
+ uid,
346
+ remove
347
+ }), true).catch(() => {});
348
+ }
349
+ }
350
+ async removeLocatorHandler(locator) {
351
+ for (const [uid, data] of this._locatorHandlers) {
352
+ if (data.locator._equals(locator)) {
353
+ this._locatorHandlers.delete(uid);
354
+ await this._channel.unregisterLocatorHandler({
355
+ uid
356
+ }).catch(() => {});
357
+ }
358
+ }
359
+ }
360
+ async waitForLoadState(state, options) {
361
+ return await this._mainFrame.waitForLoadState(state, options);
362
+ }
363
+ async waitForNavigation(options) {
364
+ return await this._mainFrame.waitForNavigation(options);
365
+ }
366
+ async waitForURL(url, options) {
367
+ return await this._mainFrame.waitForURL(url, options);
368
+ }
369
+ async waitForRequest(urlOrPredicate, options = {}) {
370
+ const predicate = async request => {
371
+ if ((0, _utils.isString)(urlOrPredicate) || (0, _utils.isRegExp)(urlOrPredicate)) return (0, _utils.urlMatches)(this._browserContext._options.baseURL, request.url(), urlOrPredicate);
372
+ return await urlOrPredicate(request);
373
+ };
374
+ const trimmedUrl = trimUrl(urlOrPredicate);
375
+ const logLine = trimmedUrl ? `waiting for request ${trimmedUrl}` : undefined;
376
+ return await this._waitForEvent(_events.Events.Page.Request, {
377
+ predicate,
378
+ timeout: options.timeout
379
+ }, logLine);
380
+ }
381
+ async waitForResponse(urlOrPredicate, options = {}) {
382
+ const predicate = async response => {
383
+ if ((0, _utils.isString)(urlOrPredicate) || (0, _utils.isRegExp)(urlOrPredicate)) return (0, _utils.urlMatches)(this._browserContext._options.baseURL, response.url(), urlOrPredicate);
384
+ return await urlOrPredicate(response);
385
+ };
386
+ const trimmedUrl = trimUrl(urlOrPredicate);
387
+ const logLine = trimmedUrl ? `waiting for response ${trimmedUrl}` : undefined;
388
+ return await this._waitForEvent(_events.Events.Page.Response, {
389
+ predicate,
390
+ timeout: options.timeout
391
+ }, logLine);
392
+ }
393
+ async waitForEvent(event, optionsOrPredicate = {}) {
394
+ return await this._waitForEvent(event, optionsOrPredicate, `waiting for event "${event}"`);
395
+ }
396
+ _closeErrorWithReason() {
397
+ return new _errors.TargetClosedError(this._closeReason || this._browserContext._effectiveCloseReason());
398
+ }
399
+ async _waitForEvent(event, optionsOrPredicate, logLine) {
400
+ return await this._wrapApiCall(async () => {
401
+ const timeout = this._timeoutSettings.timeout(typeof optionsOrPredicate === 'function' ? {} : optionsOrPredicate);
402
+ const predicate = typeof optionsOrPredicate === 'function' ? optionsOrPredicate : optionsOrPredicate.predicate;
403
+ const waiter = _waiter.Waiter.createForEvent(this, event);
404
+ if (logLine) waiter.log(logLine);
405
+ waiter.rejectOnTimeout(timeout, `Timeout ${timeout}ms exceeded while waiting for event "${event}"`);
406
+ if (event !== _events.Events.Page.Crash) waiter.rejectOnEvent(this, _events.Events.Page.Crash, new Error('Page crashed'));
407
+ if (event !== _events.Events.Page.Close) waiter.rejectOnEvent(this, _events.Events.Page.Close, () => this._closeErrorWithReason());
408
+ const result = await waiter.waitForEvent(this, event, predicate);
409
+ waiter.dispose();
410
+ return result;
411
+ });
412
+ }
413
+ async goBack(options = {}) {
414
+ const waitUntil = (0, _frame.verifyLoadState)('waitUntil', options.waitUntil === undefined ? 'load' : options.waitUntil);
415
+ return _network.Response.fromNullable((await this._channel.goBack({
416
+ ...options,
417
+ waitUntil
418
+ })).response);
419
+ }
420
+ async goForward(options = {}) {
421
+ const waitUntil = (0, _frame.verifyLoadState)('waitUntil', options.waitUntil === undefined ? 'load' : options.waitUntil);
422
+ return _network.Response.fromNullable((await this._channel.goForward({
423
+ ...options,
424
+ waitUntil
425
+ })).response);
426
+ }
427
+ async requestGC() {
428
+ await this._channel.requestGC();
429
+ }
430
+ async emulateMedia(options = {}) {
431
+ await this._channel.emulateMedia({
432
+ media: options.media === null ? 'no-override' : options.media,
433
+ colorScheme: options.colorScheme === null ? 'no-override' : options.colorScheme,
434
+ reducedMotion: options.reducedMotion === null ? 'no-override' : options.reducedMotion,
435
+ forcedColors: options.forcedColors === null ? 'no-override' : options.forcedColors
436
+ });
437
+ }
438
+ async setViewportSize(viewportSize) {
439
+ this._viewportSize = viewportSize;
440
+ await this._channel.setViewportSize({
441
+ viewportSize
442
+ });
443
+ }
444
+ viewportSize() {
445
+ return this._viewportSize;
446
+ }
447
+ async evaluate(pageFunction, arg) {
448
+ (0, _jsHandle.assertMaxArguments)(arguments.length, 2);
449
+ return await this._mainFrame.evaluate(pageFunction, arg);
450
+ }
451
+ async addInitScript(script, arg) {
452
+ const source = await (0, _clientHelper.evaluationScript)(script, arg);
453
+ await this._channel.addInitScript({
454
+ source
455
+ });
456
+ }
457
+ async route(url, handler, options = {}) {
458
+ this._routes.unshift(new _network.RouteHandler(this._browserContext._options.baseURL, url, handler, options.times));
459
+ await this._updateInterceptionPatterns();
460
+ }
461
+ async routeFromHAR(har, options = {}) {
462
+ if (options.update) {
463
+ await this._browserContext._recordIntoHAR(har, this, options);
464
+ return;
465
+ }
466
+ const harRouter = await _harRouter.HarRouter.create(this._connection.localUtils(), har, options.notFound || 'abort', {
467
+ urlMatch: options.url
468
+ });
469
+ this._harRouters.push(harRouter);
470
+ await harRouter.addPageRoute(this);
471
+ }
472
+ async routeWebSocket(url, handler) {
473
+ this._webSocketRoutes.unshift(new _network.WebSocketRouteHandler(this._browserContext._options.baseURL, url, handler));
474
+ await this._updateWebSocketInterceptionPatterns();
475
+ }
476
+ _disposeHarRouters() {
477
+ this._harRouters.forEach(router => router.dispose());
478
+ this._harRouters = [];
479
+ }
480
+ async unrouteAll(options) {
481
+ await this._unrouteInternal(this._routes, [], options === null || options === void 0 ? void 0 : options.behavior);
482
+ this._disposeHarRouters();
483
+ }
484
+ async unroute(url, handler) {
485
+ const removed = [];
486
+ const remaining = [];
487
+ for (const route of this._routes) {
488
+ if ((0, _utils.urlMatchesEqual)(route.url, url) && (!handler || route.handler === handler)) removed.push(route);else remaining.push(route);
489
+ }
490
+ await this._unrouteInternal(removed, remaining, 'default');
491
+ }
492
+ async _unrouteInternal(removed, remaining, behavior) {
493
+ this._routes = remaining;
494
+ await this._updateInterceptionPatterns();
495
+ if (!behavior || behavior === 'default') return;
496
+ const promises = removed.map(routeHandler => routeHandler.stop(behavior));
497
+ await Promise.all(promises);
498
+ }
499
+ async _updateInterceptionPatterns() {
500
+ const patterns = _network.RouteHandler.prepareInterceptionPatterns(this._routes);
501
+ await this._channel.setNetworkInterceptionPatterns({
502
+ patterns
503
+ });
504
+ }
505
+ async _updateWebSocketInterceptionPatterns() {
506
+ const patterns = _network.WebSocketRouteHandler.prepareInterceptionPatterns(this._webSocketRoutes);
507
+ await this._channel.setWebSocketInterceptionPatterns({
508
+ patterns
509
+ });
510
+ }
511
+ async screenshot(options = {}) {
512
+ const copy = {
513
+ ...options,
514
+ mask: undefined
515
+ };
516
+ if (!copy.type) copy.type = (0, _elementHandle.determineScreenshotType)(options);
517
+ if (options.mask) {
518
+ copy.mask = options.mask.map(locator => ({
519
+ frame: locator._frame._channel,
520
+ selector: locator._selector
521
+ }));
522
+ }
523
+ const result = await this._channel.screenshot(copy);
524
+ if (options.path) {
525
+ await (0, _utils.mkdirIfNeeded)(options.path);
526
+ await _fs.default.promises.writeFile(options.path, result.binary);
527
+ }
528
+ return result.binary;
529
+ }
530
+ async _expectScreenshot(options) {
531
+ const mask = options !== null && options !== void 0 && options.mask ? options === null || options === void 0 ? void 0 : options.mask.map(locator => ({
532
+ frame: locator._frame._channel,
533
+ selector: locator._selector
534
+ })) : undefined;
535
+ const locator = options.locator ? {
536
+ frame: options.locator._frame._channel,
537
+ selector: options.locator._selector
538
+ } : undefined;
539
+ return await this._channel.expectScreenshot({
540
+ ...options,
541
+ isNot: !!options.isNot,
542
+ locator,
543
+ mask
544
+ });
545
+ }
546
+ async title() {
547
+ return await this._mainFrame.title();
548
+ }
549
+ async bringToFront() {
550
+ await this._channel.bringToFront();
551
+ }
552
+ async [_Symbol$asyncDispose]() {
553
+ await this.close();
554
+ }
555
+ async close(options = {}) {
556
+ this._closeReason = options.reason;
557
+ this._closeWasCalled = true;
558
+ try {
559
+ if (this._ownedContext) await this._ownedContext.close();else await this._channel.close(options);
560
+ } catch (e) {
561
+ if ((0, _errors.isTargetClosedError)(e) && !options.runBeforeUnload) return;
562
+ throw e;
563
+ }
564
+ }
565
+ isClosed() {
566
+ return this._closed;
567
+ }
568
+ async click(selector, options) {
569
+ return await this._mainFrame.click(selector, options);
570
+ }
571
+ async dragAndDrop(source, target, options) {
572
+ return await this._mainFrame.dragAndDrop(source, target, options);
573
+ }
574
+ async dblclick(selector, options) {
575
+ return await this._mainFrame.dblclick(selector, options);
576
+ }
577
+ async tap(selector, options) {
578
+ return await this._mainFrame.tap(selector, options);
579
+ }
580
+ async fill(selector, value, options) {
581
+ return await this._mainFrame.fill(selector, value, options);
582
+ }
583
+ locator(selector, options) {
584
+ return this.mainFrame().locator(selector, options);
585
+ }
586
+ getByTestId(testId) {
587
+ return this.mainFrame().getByTestId(testId);
588
+ }
589
+ getByAltText(text, options) {
590
+ return this.mainFrame().getByAltText(text, options);
591
+ }
592
+ getByLabel(text, options) {
593
+ return this.mainFrame().getByLabel(text, options);
594
+ }
595
+ getByPlaceholder(text, options) {
596
+ return this.mainFrame().getByPlaceholder(text, options);
597
+ }
598
+ getByText(text, options) {
599
+ return this.mainFrame().getByText(text, options);
600
+ }
601
+ getByTitle(text, options) {
602
+ return this.mainFrame().getByTitle(text, options);
603
+ }
604
+ getByRole(role, options = {}) {
605
+ return this.mainFrame().getByRole(role, options);
606
+ }
607
+ frameLocator(selector) {
608
+ return this.mainFrame().frameLocator(selector);
609
+ }
610
+ async focus(selector, options) {
611
+ return await this._mainFrame.focus(selector, options);
612
+ }
613
+ async textContent(selector, options) {
614
+ return await this._mainFrame.textContent(selector, options);
615
+ }
616
+ async innerText(selector, options) {
617
+ return await this._mainFrame.innerText(selector, options);
618
+ }
619
+ async innerHTML(selector, options) {
620
+ return await this._mainFrame.innerHTML(selector, options);
621
+ }
622
+ async getAttribute(selector, name, options) {
623
+ return await this._mainFrame.getAttribute(selector, name, options);
624
+ }
625
+ async inputValue(selector, options) {
626
+ return await this._mainFrame.inputValue(selector, options);
627
+ }
628
+ async isChecked(selector, options) {
629
+ return await this._mainFrame.isChecked(selector, options);
630
+ }
631
+ async isDisabled(selector, options) {
632
+ return await this._mainFrame.isDisabled(selector, options);
633
+ }
634
+ async isEditable(selector, options) {
635
+ return await this._mainFrame.isEditable(selector, options);
636
+ }
637
+ async isEnabled(selector, options) {
638
+ return await this._mainFrame.isEnabled(selector, options);
639
+ }
640
+ async isHidden(selector, options) {
641
+ return await this._mainFrame.isHidden(selector, options);
642
+ }
643
+ async isVisible(selector, options) {
644
+ return await this._mainFrame.isVisible(selector, options);
645
+ }
646
+ async hover(selector, options) {
647
+ return await this._mainFrame.hover(selector, options);
648
+ }
649
+ async selectOption(selector, values, options) {
650
+ return await this._mainFrame.selectOption(selector, values, options);
651
+ }
652
+ async setInputFiles(selector, files, options) {
653
+ return await this._mainFrame.setInputFiles(selector, files, options);
654
+ }
655
+ async type(selector, text, options) {
656
+ return await this._mainFrame.type(selector, text, options);
657
+ }
658
+ async press(selector, key, options) {
659
+ return await this._mainFrame.press(selector, key, options);
660
+ }
661
+ async check(selector, options) {
662
+ return await this._mainFrame.check(selector, options);
663
+ }
664
+ async uncheck(selector, options) {
665
+ return await this._mainFrame.uncheck(selector, options);
666
+ }
667
+ async setChecked(selector, checked, options) {
668
+ return await this._mainFrame.setChecked(selector, checked, options);
669
+ }
670
+ async waitForTimeout(timeout) {
671
+ return await this._mainFrame.waitForTimeout(timeout);
672
+ }
673
+ async waitForFunction(pageFunction, arg, options) {
674
+ return await this._mainFrame.waitForFunction(pageFunction, arg, options);
675
+ }
676
+ workers() {
677
+ return [...this._workers];
678
+ }
679
+ async pause(_options) {
680
+ var _this$_instrumentatio;
681
+ if (require('inspector').url()) return;
682
+ const defaultNavigationTimeout = this._browserContext._timeoutSettings.defaultNavigationTimeout();
683
+ const defaultTimeout = this._browserContext._timeoutSettings.defaultTimeout();
684
+ this._browserContext.setDefaultNavigationTimeout(0);
685
+ this._browserContext.setDefaultTimeout(0);
686
+ (_this$_instrumentatio = this._instrumentation) === null || _this$_instrumentatio === void 0 || _this$_instrumentatio.onWillPause({
687
+ keepTestTimeout: !!(_options !== null && _options !== void 0 && _options.__testHookKeepTestTimeout)
688
+ });
689
+ await this._closedOrCrashedScope.safeRace(this.context()._channel.pause());
690
+ this._browserContext.setDefaultNavigationTimeout(defaultNavigationTimeout);
691
+ this._browserContext.setDefaultTimeout(defaultTimeout);
692
+ }
693
+ async pdf(options = {}) {
694
+ const transportOptions = {
695
+ ...options
696
+ };
697
+ if (transportOptions.margin) transportOptions.margin = {
698
+ ...transportOptions.margin
699
+ };
700
+ if (typeof options.width === 'number') transportOptions.width = options.width + 'px';
701
+ if (typeof options.height === 'number') transportOptions.height = options.height + 'px';
702
+ for (const margin of ['top', 'right', 'bottom', 'left']) {
703
+ const index = margin;
704
+ if (options.margin && typeof options.margin[index] === 'number') transportOptions.margin[index] = transportOptions.margin[index] + 'px';
705
+ }
706
+ const result = await this._channel.pdf(transportOptions);
707
+ if (options.path) {
708
+ await _fs.default.promises.mkdir(_path.default.dirname(options.path), {
709
+ recursive: true
710
+ });
711
+ await _fs.default.promises.writeFile(options.path, result.pdf);
712
+ }
713
+ return result.pdf;
714
+ }
715
+ }
716
+ exports.Page = Page;
717
+ class BindingCall extends _channelOwner.ChannelOwner {
718
+ static from(channel) {
719
+ return channel._object;
720
+ }
721
+ constructor(parent, type, guid, initializer) {
722
+ super(parent, type, guid, initializer);
723
+ }
724
+ async call(func) {
725
+ try {
726
+ const frame = _frame.Frame.from(this._initializer.frame);
727
+ const source = {
728
+ context: frame._page.context(),
729
+ page: frame._page,
730
+ frame
731
+ };
732
+ let result;
733
+ if (this._initializer.handle) result = await func(source, _jsHandle.JSHandle.from(this._initializer.handle));else result = await func(source, ...this._initializer.args.map(_jsHandle.parseResult));
734
+ this._channel.resolve({
735
+ result: (0, _jsHandle.serializeArgument)(result)
736
+ }).catch(() => {});
737
+ } catch (e) {
738
+ this._channel.reject({
739
+ error: (0, _errors.serializeError)(e)
740
+ }).catch(() => {});
741
+ }
742
+ }
743
+ }
744
+ exports.BindingCall = BindingCall;
745
+ function trimUrl(param) {
746
+ if ((0, _utils.isRegExp)(param)) return `/${(0, _utils.trimStringWithEllipsis)(param.source, 50)}/${param.flags}`;
747
+ if ((0, _utils.isString)(param)) return `"${(0, _utils.trimStringWithEllipsis)(param, 50)}"`;
748
+ }