easytouch-linux 1.0.7 → 1.0.18

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 (337) hide show
  1. package/LICENSE.txt +201 -0
  2. package/README.md +33 -314
  3. package/SKILL.md +366 -0
  4. package/bin/arm64/et +0 -0
  5. package/bin/et.js +60 -0
  6. package/bin/x64/et +0 -0
  7. package/package.json +19 -37
  8. package/.playwright/node/LICENSE +0 -2607
  9. package/.playwright/node/linux-x64/node +0 -0
  10. package/.playwright/package/README.md +0 -3
  11. package/.playwright/package/ThirdPartyNotices.txt +0 -1602
  12. package/.playwright/package/api.json +0 -1
  13. package/.playwright/package/bin/install_media_pack.ps1 +0 -5
  14. package/.playwright/package/bin/reinstall_chrome_beta_linux.sh +0 -42
  15. package/.playwright/package/bin/reinstall_chrome_beta_mac.sh +0 -13
  16. package/.playwright/package/bin/reinstall_chrome_beta_win.ps1 +0 -24
  17. package/.playwright/package/bin/reinstall_chrome_stable_linux.sh +0 -42
  18. package/.playwright/package/bin/reinstall_chrome_stable_mac.sh +0 -12
  19. package/.playwright/package/bin/reinstall_chrome_stable_win.ps1 +0 -24
  20. package/.playwright/package/bin/reinstall_msedge_beta_linux.sh +0 -48
  21. package/.playwright/package/bin/reinstall_msedge_beta_mac.sh +0 -11
  22. package/.playwright/package/bin/reinstall_msedge_beta_win.ps1 +0 -23
  23. package/.playwright/package/bin/reinstall_msedge_dev_linux.sh +0 -48
  24. package/.playwright/package/bin/reinstall_msedge_dev_mac.sh +0 -11
  25. package/.playwright/package/bin/reinstall_msedge_dev_win.ps1 +0 -23
  26. package/.playwright/package/bin/reinstall_msedge_stable_linux.sh +0 -48
  27. package/.playwright/package/bin/reinstall_msedge_stable_mac.sh +0 -11
  28. package/.playwright/package/bin/reinstall_msedge_stable_win.ps1 +0 -24
  29. package/.playwright/package/browsers.json +0 -66
  30. package/.playwright/package/cli.js +0 -18
  31. package/.playwright/package/index.d.ts +0 -17
  32. package/.playwright/package/index.js +0 -33
  33. package/.playwright/package/index.mjs +0 -28
  34. package/.playwright/package/lib/androidServerImpl.js +0 -69
  35. package/.playwright/package/lib/browserServerImpl.js +0 -92
  36. package/.playwright/package/lib/cli/driver.js +0 -95
  37. package/.playwright/package/lib/cli/program.js +0 -583
  38. package/.playwright/package/lib/cli/programWithTestStub.js +0 -67
  39. package/.playwright/package/lib/client/accessibility.js +0 -50
  40. package/.playwright/package/lib/client/android.js +0 -473
  41. package/.playwright/package/lib/client/api.js +0 -285
  42. package/.playwright/package/lib/client/artifact.js +0 -79
  43. package/.playwright/package/lib/client/browser.js +0 -145
  44. package/.playwright/package/lib/client/browserContext.js +0 -559
  45. package/.playwright/package/lib/client/browserType.js +0 -241
  46. package/.playwright/package/lib/client/cdpSession.js +0 -53
  47. package/.playwright/package/lib/client/channelOwner.js +0 -215
  48. package/.playwright/package/lib/client/clientHelper.js +0 -57
  49. package/.playwright/package/lib/client/clientInstrumentation.js +0 -52
  50. package/.playwright/package/lib/client/clock.js +0 -68
  51. package/.playwright/package/lib/client/connection.js +0 -333
  52. package/.playwright/package/lib/client/consoleMessage.js +0 -55
  53. package/.playwright/package/lib/client/coverage.js +0 -41
  54. package/.playwright/package/lib/client/dialog.js +0 -57
  55. package/.playwright/package/lib/client/download.js +0 -62
  56. package/.playwright/package/lib/client/electron.js +0 -135
  57. package/.playwright/package/lib/client/elementHandle.js +0 -321
  58. package/.playwright/package/lib/client/errors.js +0 -77
  59. package/.playwright/package/lib/client/eventEmitter.js +0 -314
  60. package/.playwright/package/lib/client/events.js +0 -94
  61. package/.playwright/package/lib/client/fetch.js +0 -391
  62. package/.playwright/package/lib/client/fileChooser.js +0 -45
  63. package/.playwright/package/lib/client/frame.js +0 -504
  64. package/.playwright/package/lib/client/harRouter.js +0 -99
  65. package/.playwright/package/lib/client/input.js +0 -111
  66. package/.playwright/package/lib/client/jsHandle.js +0 -121
  67. package/.playwright/package/lib/client/jsonPipe.js +0 -35
  68. package/.playwright/package/lib/client/localUtils.js +0 -36
  69. package/.playwright/package/lib/client/locator.js +0 -448
  70. package/.playwright/package/lib/client/network.js +0 -769
  71. package/.playwright/package/lib/client/page.js +0 -748
  72. package/.playwright/package/lib/client/playwright.js +0 -80
  73. package/.playwright/package/lib/client/selectors.js +0 -67
  74. package/.playwright/package/lib/client/stream.js +0 -54
  75. package/.playwright/package/lib/client/tracing.js +0 -147
  76. package/.playwright/package/lib/client/types.js +0 -24
  77. package/.playwright/package/lib/client/video.js +0 -51
  78. package/.playwright/package/lib/client/waiter.js +0 -162
  79. package/.playwright/package/lib/client/webError.js +0 -37
  80. package/.playwright/package/lib/client/worker.js +0 -71
  81. package/.playwright/package/lib/client/writableStream.js +0 -54
  82. package/.playwright/package/lib/common/socksProxy.js +0 -569
  83. package/.playwright/package/lib/common/timeoutSettings.js +0 -73
  84. package/.playwright/package/lib/common/types.js +0 -5
  85. package/.playwright/package/lib/generated/clockSource.js +0 -7
  86. package/.playwright/package/lib/generated/consoleApiSource.js +0 -7
  87. package/.playwright/package/lib/generated/injectedScriptSource.js +0 -7
  88. package/.playwright/package/lib/generated/pollingRecorderSource.js +0 -7
  89. package/.playwright/package/lib/generated/utilityScriptSource.js +0 -7
  90. package/.playwright/package/lib/generated/webSocketMockSource.js +0 -7
  91. package/.playwright/package/lib/image_tools/colorUtils.js +0 -98
  92. package/.playwright/package/lib/image_tools/compare.js +0 -108
  93. package/.playwright/package/lib/image_tools/imageChannel.js +0 -70
  94. package/.playwright/package/lib/image_tools/stats.js +0 -102
  95. package/.playwright/package/lib/inProcessFactory.js +0 -56
  96. package/.playwright/package/lib/inprocess.js +0 -20
  97. package/.playwright/package/lib/outofprocess.js +0 -67
  98. package/.playwright/package/lib/protocol/debug.js +0 -27
  99. package/.playwright/package/lib/protocol/serializers.js +0 -173
  100. package/.playwright/package/lib/protocol/transport.js +0 -82
  101. package/.playwright/package/lib/protocol/validator.js +0 -2780
  102. package/.playwright/package/lib/protocol/validatorPrimitives.js +0 -139
  103. package/.playwright/package/lib/remote/playwrightConnection.js +0 -275
  104. package/.playwright/package/lib/remote/playwrightServer.js +0 -111
  105. package/.playwright/package/lib/server/accessibility.js +0 -62
  106. package/.playwright/package/lib/server/android/android.js +0 -441
  107. package/.playwright/package/lib/server/android/backendAdb.js +0 -172
  108. package/.playwright/package/lib/server/artifact.js +0 -104
  109. package/.playwright/package/lib/server/bidi/bidiBrowser.js +0 -314
  110. package/.playwright/package/lib/server/bidi/bidiChromium.js +0 -124
  111. package/.playwright/package/lib/server/bidi/bidiConnection.js +0 -204
  112. package/.playwright/package/lib/server/bidi/bidiExecutionContext.js +0 -175
  113. package/.playwright/package/lib/server/bidi/bidiFirefox.js +0 -104
  114. package/.playwright/package/lib/server/bidi/bidiInput.js +0 -160
  115. package/.playwright/package/lib/server/bidi/bidiNetworkManager.js +0 -337
  116. package/.playwright/package/lib/server/bidi/bidiOverCdp.js +0 -103
  117. package/.playwright/package/lib/server/bidi/bidiPage.js +0 -518
  118. package/.playwright/package/lib/server/bidi/bidiPdf.js +0 -140
  119. package/.playwright/package/lib/server/bidi/third_party/bidiDeserializer.js +0 -93
  120. package/.playwright/package/lib/server/bidi/third_party/bidiKeyboard.js +0 -240
  121. package/.playwright/package/lib/server/bidi/third_party/bidiProtocol.js +0 -139
  122. package/.playwright/package/lib/server/bidi/third_party/bidiSerializer.js +0 -144
  123. package/.playwright/package/lib/server/bidi/third_party/firefoxPrefs.js +0 -221
  124. package/.playwright/package/lib/server/browser.js +0 -148
  125. package/.playwright/package/lib/server/browserContext.js +0 -675
  126. package/.playwright/package/lib/server/browserType.js +0 -338
  127. package/.playwright/package/lib/server/chromium/appIcon.png +0 -0
  128. package/.playwright/package/lib/server/chromium/chromium.js +0 -354
  129. package/.playwright/package/lib/server/chromium/chromiumSwitches.js +0 -46
  130. package/.playwright/package/lib/server/chromium/crAccessibility.js +0 -237
  131. package/.playwright/package/lib/server/chromium/crBrowser.js +0 -516
  132. package/.playwright/package/lib/server/chromium/crConnection.js +0 -228
  133. package/.playwright/package/lib/server/chromium/crCoverage.js +0 -246
  134. package/.playwright/package/lib/server/chromium/crDevTools.js +0 -104
  135. package/.playwright/package/lib/server/chromium/crDragDrop.js +0 -143
  136. package/.playwright/package/lib/server/chromium/crExecutionContext.js +0 -132
  137. package/.playwright/package/lib/server/chromium/crInput.js +0 -182
  138. package/.playwright/package/lib/server/chromium/crNetworkManager.js +0 -767
  139. package/.playwright/package/lib/server/chromium/crPage.js +0 -1122
  140. package/.playwright/package/lib/server/chromium/crPdf.js +0 -153
  141. package/.playwright/package/lib/server/chromium/crProtocolHelper.js +0 -133
  142. package/.playwright/package/lib/server/chromium/crServiceWorker.js +0 -112
  143. package/.playwright/package/lib/server/chromium/defaultFontFamilies.js +0 -145
  144. package/.playwright/package/lib/server/chromium/videoRecorder.js +0 -155
  145. package/.playwright/package/lib/server/clock.js +0 -125
  146. package/.playwright/package/lib/server/codegen/csharp.js +0 -304
  147. package/.playwright/package/lib/server/codegen/java.js +0 -243
  148. package/.playwright/package/lib/server/codegen/javascript.js +0 -253
  149. package/.playwright/package/lib/server/codegen/jsonl.js +0 -47
  150. package/.playwright/package/lib/server/codegen/language.js +0 -88
  151. package/.playwright/package/lib/server/codegen/languages.js +0 -30
  152. package/.playwright/package/lib/server/codegen/python.js +0 -262
  153. package/.playwright/package/lib/server/codegen/types.js +0 -5
  154. package/.playwright/package/lib/server/console.js +0 -57
  155. package/.playwright/package/lib/server/cookieStore.js +0 -185
  156. package/.playwright/package/lib/server/debugController.js +0 -212
  157. package/.playwright/package/lib/server/debugger.js +0 -132
  158. package/.playwright/package/lib/server/deviceDescriptors.js +0 -26
  159. package/.playwright/package/lib/server/deviceDescriptorsSource.json +0 -1669
  160. package/.playwright/package/lib/server/dialog.js +0 -71
  161. package/.playwright/package/lib/server/dispatchers/androidDispatcher.js +0 -204
  162. package/.playwright/package/lib/server/dispatchers/artifactDispatcher.js +0 -118
  163. package/.playwright/package/lib/server/dispatchers/browserContextDispatcher.js +0 -357
  164. package/.playwright/package/lib/server/dispatchers/browserDispatcher.js +0 -170
  165. package/.playwright/package/lib/server/dispatchers/browserTypeDispatcher.js +0 -55
  166. package/.playwright/package/lib/server/dispatchers/cdpSessionDispatcher.js +0 -48
  167. package/.playwright/package/lib/server/dispatchers/debugControllerDispatcher.js +0 -105
  168. package/.playwright/package/lib/server/dispatchers/dialogDispatcher.js +0 -44
  169. package/.playwright/package/lib/server/dispatchers/dispatcher.js +0 -395
  170. package/.playwright/package/lib/server/dispatchers/electronDispatcher.js +0 -93
  171. package/.playwright/package/lib/server/dispatchers/elementHandlerDispatcher.js +0 -228
  172. package/.playwright/package/lib/server/dispatchers/frameDispatcher.js +0 -294
  173. package/.playwright/package/lib/server/dispatchers/jsHandleDispatcher.js +0 -97
  174. package/.playwright/package/lib/server/dispatchers/jsonPipeDispatcher.js +0 -59
  175. package/.playwright/package/lib/server/dispatchers/localUtilsDispatcher.js +0 -413
  176. package/.playwright/package/lib/server/dispatchers/networkDispatchers.js +0 -221
  177. package/.playwright/package/lib/server/dispatchers/pageDispatcher.js +0 -367
  178. package/.playwright/package/lib/server/dispatchers/playwrightDispatcher.js +0 -107
  179. package/.playwright/package/lib/server/dispatchers/selectorsDispatcher.js +0 -36
  180. package/.playwright/package/lib/server/dispatchers/streamDispatcher.js +0 -62
  181. package/.playwright/package/lib/server/dispatchers/tracingDispatcher.js +0 -64
  182. package/.playwright/package/lib/server/dispatchers/webSocketRouteDispatcher.js +0 -188
  183. package/.playwright/package/lib/server/dispatchers/writableStreamDispatcher.js +0 -58
  184. package/.playwright/package/lib/server/dom.js +0 -893
  185. package/.playwright/package/lib/server/download.js +0 -60
  186. package/.playwright/package/lib/server/electron/electron.js +0 -296
  187. package/.playwright/package/lib/server/electron/loader.js +0 -57
  188. package/.playwright/package/lib/server/errors.js +0 -68
  189. package/.playwright/package/lib/server/fetch.js +0 -663
  190. package/.playwright/package/lib/server/fileChooser.js +0 -42
  191. package/.playwright/package/lib/server/fileUploadUtils.js +0 -75
  192. package/.playwright/package/lib/server/firefox/ffAccessibility.js +0 -216
  193. package/.playwright/package/lib/server/firefox/ffBrowser.js +0 -462
  194. package/.playwright/package/lib/server/firefox/ffConnection.js +0 -168
  195. package/.playwright/package/lib/server/firefox/ffExecutionContext.js +0 -123
  196. package/.playwright/package/lib/server/firefox/ffInput.js +0 -161
  197. package/.playwright/package/lib/server/firefox/ffNetworkManager.js +0 -233
  198. package/.playwright/package/lib/server/firefox/ffPage.js +0 -544
  199. package/.playwright/package/lib/server/firefox/firefox.js +0 -99
  200. package/.playwright/package/lib/server/formData.js +0 -75
  201. package/.playwright/package/lib/server/frameSelectors.js +0 -171
  202. package/.playwright/package/lib/server/frames.js +0 -1663
  203. package/.playwright/package/lib/server/har/harRecorder.js +0 -139
  204. package/.playwright/package/lib/server/har/harTracer.js +0 -542
  205. package/.playwright/package/lib/server/helper.js +0 -103
  206. package/.playwright/package/lib/server/index.js +0 -108
  207. package/.playwright/package/lib/server/input.js +0 -309
  208. package/.playwright/package/lib/server/instrumentation.js +0 -70
  209. package/.playwright/package/lib/server/isomorphic/utilityScriptSerializers.js +0 -226
  210. package/.playwright/package/lib/server/javascript.js +0 -293
  211. package/.playwright/package/lib/server/launchApp.js +0 -91
  212. package/.playwright/package/lib/server/macEditingCommands.js +0 -139
  213. package/.playwright/package/lib/server/network.js +0 -617
  214. package/.playwright/package/lib/server/page.js +0 -863
  215. package/.playwright/package/lib/server/pipeTransport.js +0 -85
  216. package/.playwright/package/lib/server/playwright.js +0 -88
  217. package/.playwright/package/lib/server/progress.js +0 -99
  218. package/.playwright/package/lib/server/protocolError.js +0 -49
  219. package/.playwright/package/lib/server/recorder/chat.js +0 -177
  220. package/.playwright/package/lib/server/recorder/contextRecorder.js +0 -290
  221. package/.playwright/package/lib/server/recorder/recorderApp.js +0 -187
  222. package/.playwright/package/lib/server/recorder/recorderCollection.js +0 -104
  223. package/.playwright/package/lib/server/recorder/recorderFrontend.js +0 -5
  224. package/.playwright/package/lib/server/recorder/recorderRunner.js +0 -159
  225. package/.playwright/package/lib/server/recorder/recorderUtils.js +0 -89
  226. package/.playwright/package/lib/server/recorder/throttledFile.js +0 -46
  227. package/.playwright/package/lib/server/recorder.js +0 -367
  228. package/.playwright/package/lib/server/registry/browserFetcher.js +0 -168
  229. package/.playwright/package/lib/server/registry/dependencies.js +0 -322
  230. package/.playwright/package/lib/server/registry/index.js +0 -1165
  231. package/.playwright/package/lib/server/registry/nativeDeps.js +0 -496
  232. package/.playwright/package/lib/server/registry/oopDownloadBrowserMain.js +0 -138
  233. package/.playwright/package/lib/server/screenshotter.js +0 -348
  234. package/.playwright/package/lib/server/selectors.js +0 -73
  235. package/.playwright/package/lib/server/socksClientCertificatesInterceptor.js +0 -340
  236. package/.playwright/package/lib/server/socksInterceptor.js +0 -100
  237. package/.playwright/package/lib/server/trace/recorder/snapshotter.js +0 -161
  238. package/.playwright/package/lib/server/trace/recorder/snapshotterInjected.js +0 -518
  239. package/.playwright/package/lib/server/trace/recorder/tracing.js +0 -596
  240. package/.playwright/package/lib/server/trace/test/inMemorySnapshotter.js +0 -93
  241. package/.playwright/package/lib/server/trace/viewer/traceViewer.js +0 -219
  242. package/.playwright/package/lib/server/transport.js +0 -192
  243. package/.playwright/package/lib/server/types.js +0 -24
  244. package/.playwright/package/lib/server/usKeyboardLayout.js +0 -555
  245. package/.playwright/package/lib/server/webkit/webkit.js +0 -87
  246. package/.playwright/package/lib/server/webkit/wkAccessibility.js +0 -194
  247. package/.playwright/package/lib/server/webkit/wkBrowser.js +0 -329
  248. package/.playwright/package/lib/server/webkit/wkConnection.js +0 -173
  249. package/.playwright/package/lib/server/webkit/wkExecutionContext.js +0 -131
  250. package/.playwright/package/lib/server/webkit/wkInput.js +0 -179
  251. package/.playwright/package/lib/server/webkit/wkInterceptableRequest.js +0 -162
  252. package/.playwright/package/lib/server/webkit/wkPage.js +0 -1207
  253. package/.playwright/package/lib/server/webkit/wkProvisionalPage.js +0 -94
  254. package/.playwright/package/lib/server/webkit/wkWorkers.js +0 -104
  255. package/.playwright/package/lib/third_party/pixelmatch.js +0 -255
  256. package/.playwright/package/lib/utils/ascii.js +0 -31
  257. package/.playwright/package/lib/utils/comparators.js +0 -159
  258. package/.playwright/package/lib/utils/crypto.js +0 -171
  259. package/.playwright/package/lib/utils/debug.js +0 -46
  260. package/.playwright/package/lib/utils/debugLogger.js +0 -93
  261. package/.playwright/package/lib/utils/env.js +0 -49
  262. package/.playwright/package/lib/utils/eventsHelper.js +0 -38
  263. package/.playwright/package/lib/utils/expectUtils.js +0 -33
  264. package/.playwright/package/lib/utils/fileUtils.js +0 -205
  265. package/.playwright/package/lib/utils/happy-eyeballs.js +0 -194
  266. package/.playwright/package/lib/utils/headers.js +0 -52
  267. package/.playwright/package/lib/utils/hostPlatform.js +0 -145
  268. package/.playwright/package/lib/utils/httpServer.js +0 -233
  269. package/.playwright/package/lib/utils/index.js +0 -368
  270. package/.playwright/package/lib/utils/isomorphic/ariaSnapshot.js +0 -391
  271. package/.playwright/package/lib/utils/isomorphic/cssParser.js +0 -250
  272. package/.playwright/package/lib/utils/isomorphic/cssTokenizer.js +0 -979
  273. package/.playwright/package/lib/utils/isomorphic/locatorGenerators.js +0 -660
  274. package/.playwright/package/lib/utils/isomorphic/locatorParser.js +0 -185
  275. package/.playwright/package/lib/utils/isomorphic/locatorUtils.js +0 -62
  276. package/.playwright/package/lib/utils/isomorphic/mimeType.js +0 -29
  277. package/.playwright/package/lib/utils/isomorphic/selectorParser.js +0 -397
  278. package/.playwright/package/lib/utils/isomorphic/stringUtils.js +0 -169
  279. package/.playwright/package/lib/utils/isomorphic/traceUtils.js +0 -39
  280. package/.playwright/package/lib/utils/isomorphic/urlMatch.js +0 -122
  281. package/.playwright/package/lib/utils/linuxUtils.js +0 -78
  282. package/.playwright/package/lib/utils/manualPromise.js +0 -109
  283. package/.playwright/package/lib/utils/multimap.js +0 -75
  284. package/.playwright/package/lib/utils/network.js +0 -160
  285. package/.playwright/package/lib/utils/processLauncher.js +0 -248
  286. package/.playwright/package/lib/utils/profiler.js +0 -53
  287. package/.playwright/package/lib/utils/rtti.js +0 -44
  288. package/.playwright/package/lib/utils/semaphore.js +0 -51
  289. package/.playwright/package/lib/utils/sequence.js +0 -64
  290. package/.playwright/package/lib/utils/spawnAsync.js +0 -45
  291. package/.playwright/package/lib/utils/stackTrace.js +0 -134
  292. package/.playwright/package/lib/utils/task.js +0 -58
  293. package/.playwright/package/lib/utils/time.js +0 -37
  294. package/.playwright/package/lib/utils/timeoutRunner.js +0 -66
  295. package/.playwright/package/lib/utils/traceUtils.js +0 -44
  296. package/.playwright/package/lib/utils/userAgent.js +0 -105
  297. package/.playwright/package/lib/utils/wsServer.js +0 -128
  298. package/.playwright/package/lib/utils/zipFile.js +0 -75
  299. package/.playwright/package/lib/utils/zones.js +0 -69
  300. package/.playwright/package/lib/utilsBundle.js +0 -81
  301. package/.playwright/package/lib/utilsBundleImpl/index.js +0 -210
  302. package/.playwright/package/lib/utilsBundleImpl/xdg-open +0 -1066
  303. package/.playwright/package/lib/vite/htmlReport/index.html +0 -69
  304. package/.playwright/package/lib/vite/recorder/assets/codeMirrorModule-C3UTv-Ge.css +0 -1
  305. package/.playwright/package/lib/vite/recorder/assets/codeMirrorModule-k-61wZCK.js +0 -24
  306. package/.playwright/package/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  307. package/.playwright/package/lib/vite/recorder/assets/index-B70BEW3b.js +0 -184
  308. package/.playwright/package/lib/vite/recorder/assets/index-eHBmevrY.css +0 -1
  309. package/.playwright/package/lib/vite/recorder/index.html +0 -29
  310. package/.playwright/package/lib/vite/recorder/playwright-logo.svg +0 -9
  311. package/.playwright/package/lib/vite/traceViewer/assets/codeMirrorModule-CyuxU5C-.js +0 -24
  312. package/.playwright/package/lib/vite/traceViewer/assets/defaultSettingsView-5nVJRt0A.js +0 -243
  313. package/.playwright/package/lib/vite/traceViewer/assets/xtermModule-c-SNdYZy.js +0 -9
  314. package/.playwright/package/lib/vite/traceViewer/codeMirrorModule.C3UTv-Ge.css +0 -1
  315. package/.playwright/package/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  316. package/.playwright/package/lib/vite/traceViewer/defaultSettingsView.2xeEXCXv.css +0 -1
  317. package/.playwright/package/lib/vite/traceViewer/index.CFOW-Ezb.css +0 -1
  318. package/.playwright/package/lib/vite/traceViewer/index.html +0 -43
  319. package/.playwright/package/lib/vite/traceViewer/index.qVn2ZnpC.js +0 -2
  320. package/.playwright/package/lib/vite/traceViewer/playwright-logo.svg +0 -9
  321. package/.playwright/package/lib/vite/traceViewer/snapshot.html +0 -21
  322. package/.playwright/package/lib/vite/traceViewer/sw.bundle.js +0 -3
  323. package/.playwright/package/lib/vite/traceViewer/uiMode.BatfzHMG.css +0 -1
  324. package/.playwright/package/lib/vite/traceViewer/uiMode.html +0 -17
  325. package/.playwright/package/lib/vite/traceViewer/uiMode.m4IPRPOd.js +0 -5
  326. package/.playwright/package/lib/vite/traceViewer/xtermModule.Beg8tuEN.css +0 -32
  327. package/.playwright/package/lib/zipBundle.js +0 -25
  328. package/.playwright/package/lib/zipBundleImpl.js +0 -5
  329. package/.playwright/package/package.json +0 -44
  330. package/.playwright/package/protocol.yml +0 -3758
  331. package/.playwright/package/types/protocol.d.ts +0 -21868
  332. package/.playwright/package/types/structs.d.ts +0 -45
  333. package/.playwright/package/types/types.d.ts +0 -22663
  334. package/et +0 -0
  335. package/install.js +0 -19
  336. package/playwright.ps1 +0 -7
  337. package/scripts/playwright-bridge.js +0 -560
@@ -1,748 +0,0 @@
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
- }