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,159 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.performAction = performAction;
7
- exports.toClickOptions = toClickOptions;
8
- var _utils = require("../../utils");
9
- var _language = require("../codegen/language");
10
- var _instrumentation = require("../instrumentation");
11
- var _recorderUtils = require("./recorderUtils");
12
- /**
13
- * Copyright (c) Microsoft Corporation.
14
- *
15
- * Licensed under the Apache License, Version 2.0 (the "License");
16
- * you may not use this file except in compliance with the License.
17
- * You may obtain a copy of the License at
18
- *
19
- * http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software
22
- * distributed under the License is distributed on an "AS IS" BASIS,
23
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24
- * See the License for the specific language governing permissions and
25
- * limitations under the License.
26
- */
27
-
28
- async function performAction(pageAliases, actionInContext) {
29
- const callMetadata = (0, _instrumentation.serverSideCallMetadata)();
30
- const mainFrame = (0, _recorderUtils.mainFrameForAction)(pageAliases, actionInContext);
31
- const {
32
- action
33
- } = actionInContext;
34
- const kActionTimeout = 5000;
35
- if (action.name === 'navigate') {
36
- await mainFrame.goto(callMetadata, action.url, {
37
- timeout: kActionTimeout
38
- });
39
- return;
40
- }
41
- if (action.name === 'openPage') throw Error('Not reached');
42
- if (action.name === 'closePage') {
43
- await mainFrame._page.close(callMetadata);
44
- return;
45
- }
46
- const selector = (0, _recorderUtils.buildFullSelector)(actionInContext.frame.framePath, action.selector);
47
- if (action.name === 'click') {
48
- const options = toClickOptions(action);
49
- await mainFrame.click(callMetadata, selector, {
50
- ...options,
51
- timeout: kActionTimeout,
52
- strict: true
53
- });
54
- return;
55
- }
56
- if (action.name === 'press') {
57
- const modifiers = (0, _language.toKeyboardModifiers)(action.modifiers);
58
- const shortcut = [...modifiers, action.key].join('+');
59
- await mainFrame.press(callMetadata, selector, shortcut, {
60
- timeout: kActionTimeout,
61
- strict: true
62
- });
63
- return;
64
- }
65
- if (action.name === 'fill') {
66
- await mainFrame.fill(callMetadata, selector, action.text, {
67
- timeout: kActionTimeout,
68
- strict: true
69
- });
70
- return;
71
- }
72
- if (action.name === 'setInputFiles') {
73
- await mainFrame.setInputFiles(callMetadata, selector, {
74
- selector,
75
- payloads: [],
76
- timeout: kActionTimeout,
77
- strict: true
78
- });
79
- return;
80
- }
81
- if (action.name === 'check') {
82
- await mainFrame.check(callMetadata, selector, {
83
- timeout: kActionTimeout,
84
- strict: true
85
- });
86
- return;
87
- }
88
- if (action.name === 'uncheck') {
89
- await mainFrame.uncheck(callMetadata, selector, {
90
- timeout: kActionTimeout,
91
- strict: true
92
- });
93
- return;
94
- }
95
- if (action.name === 'select') {
96
- const values = action.options.map(value => ({
97
- value
98
- }));
99
- await mainFrame.selectOption(callMetadata, selector, [], values, {
100
- timeout: kActionTimeout,
101
- strict: true
102
- });
103
- return;
104
- }
105
- if (action.name === 'assertChecked') {
106
- await mainFrame.expect(callMetadata, selector, {
107
- selector,
108
- expression: 'to.be.checked',
109
- expectedValue: {
110
- checked: action.checked
111
- },
112
- isNot: !action.checked,
113
- timeout: kActionTimeout
114
- });
115
- return;
116
- }
117
- if (action.name === 'assertText') {
118
- await mainFrame.expect(callMetadata, selector, {
119
- selector,
120
- expression: 'to.have.text',
121
- expectedText: (0, _utils.serializeExpectedTextValues)([action.text], {
122
- matchSubstring: true,
123
- normalizeWhiteSpace: true
124
- }),
125
- isNot: false,
126
- timeout: kActionTimeout
127
- });
128
- return;
129
- }
130
- if (action.name === 'assertValue') {
131
- await mainFrame.expect(callMetadata, selector, {
132
- selector,
133
- expression: 'to.have.value',
134
- expectedValue: action.value,
135
- isNot: false,
136
- timeout: kActionTimeout
137
- });
138
- return;
139
- }
140
- if (action.name === 'assertVisible') {
141
- await mainFrame.expect(callMetadata, selector, {
142
- selector,
143
- expression: 'to.be.visible',
144
- isNot: false,
145
- timeout: kActionTimeout
146
- });
147
- return;
148
- }
149
- throw new Error('Internal error: unexpected action ' + action.name);
150
- }
151
- function toClickOptions(action) {
152
- const modifiers = (0, _language.toKeyboardModifiers)(action.modifiers);
153
- const options = {};
154
- if (action.button !== 'left') options.button = action.button;
155
- if (modifiers.length) options.modifiers = modifiers;
156
- if (action.clickCount > 1) options.clickCount = action.clickCount;
157
- if (action.position) options.position = action.position;
158
- return options;
159
- }
@@ -1,89 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.buildFullSelector = buildFullSelector;
7
- exports.collapseActions = collapseActions;
8
- exports.frameForAction = frameForAction;
9
- exports.mainFrameForAction = mainFrameForAction;
10
- exports.metadataToCallLog = metadataToCallLog;
11
- /**
12
- * Copyright (c) Microsoft Corporation.
13
- *
14
- * Licensed under the Apache License, Version 2.0 (the "License");
15
- * you may not use this file except in compliance with the License.
16
- * You may obtain a copy of the License at
17
- *
18
- * http://www.apache.org/licenses/LICENSE-2.0
19
- *
20
- * Unless required by applicable law or agreed to in writing, software
21
- * distributed under the License is distributed on an "AS IS" BASIS,
22
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
- * See the License for the specific language governing permissions and
24
- * limitations under the License.
25
- */
26
-
27
- function buildFullSelector(framePath, selector) {
28
- return [...framePath, selector].join(' >> internal:control=enter-frame >> ');
29
- }
30
- function metadataToCallLog(metadata, status) {
31
- var _metadata$params, _metadata$params2, _metadata$error;
32
- let title = metadata.apiName || metadata.method;
33
- if (metadata.method === 'waitForEventInfo') title += `(${metadata.params.info.event})`;
34
- title = title.replace('object.expect', 'expect');
35
- if (metadata.error) status = 'error';
36
- const params = {
37
- url: (_metadata$params = metadata.params) === null || _metadata$params === void 0 ? void 0 : _metadata$params.url,
38
- selector: (_metadata$params2 = metadata.params) === null || _metadata$params2 === void 0 ? void 0 : _metadata$params2.selector
39
- };
40
- let duration = metadata.endTime ? metadata.endTime - metadata.startTime : undefined;
41
- if (typeof duration === 'number' && metadata.pauseStartTime && metadata.pauseEndTime) {
42
- duration -= metadata.pauseEndTime - metadata.pauseStartTime;
43
- duration = Math.max(duration, 0);
44
- }
45
- const callLog = {
46
- id: metadata.id,
47
- messages: metadata.log,
48
- title,
49
- status,
50
- error: (_metadata$error = metadata.error) === null || _metadata$error === void 0 || (_metadata$error = _metadata$error.error) === null || _metadata$error === void 0 ? void 0 : _metadata$error.message,
51
- params,
52
- duration
53
- };
54
- return callLog;
55
- }
56
- function mainFrameForAction(pageAliases, actionInContext) {
57
- var _find;
58
- const pageAlias = actionInContext.frame.pageAlias;
59
- const page = (_find = [...pageAliases.entries()].find(([, alias]) => pageAlias === alias)) === null || _find === void 0 ? void 0 : _find[0];
60
- if (!page) throw new Error(`Internal error: page ${pageAlias} not found in [${[...pageAliases.values()]}]`);
61
- return page.mainFrame();
62
- }
63
- async function frameForAction(pageAliases, actionInContext, action) {
64
- var _find2;
65
- const pageAlias = actionInContext.frame.pageAlias;
66
- const page = (_find2 = [...pageAliases.entries()].find(([, alias]) => pageAlias === alias)) === null || _find2 === void 0 ? void 0 : _find2[0];
67
- if (!page) throw new Error('Internal error: page not found');
68
- const fullSelector = buildFullSelector(actionInContext.frame.framePath, action.selector);
69
- const result = await page.mainFrame().selectors.resolveFrameForSelector(fullSelector);
70
- if (!result) throw new Error('Internal error: frame not found');
71
- return result.frame;
72
- }
73
- function collapseActions(actions) {
74
- const result = [];
75
- for (const action of actions) {
76
- const lastAction = result[result.length - 1];
77
- const isSameAction = lastAction && lastAction.action.name === action.action.name && lastAction.frame.pageAlias === action.frame.pageAlias && lastAction.frame.framePath.join('|') === action.frame.framePath.join('|');
78
- const isSameSelector = lastAction && 'selector' in lastAction.action && 'selector' in action.action && action.action.selector === lastAction.action.selector;
79
- const shouldMerge = isSameAction && (action.action.name === 'navigate' || action.action.name === 'fill' && isSameSelector);
80
- if (!shouldMerge) {
81
- result.push(action);
82
- continue;
83
- }
84
- const startTime = result[result.length - 1].startTime;
85
- result[result.length - 1] = action;
86
- result[result.length - 1].startTime = startTime;
87
- }
88
- return result;
89
- }
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ThrottledFile = void 0;
7
- var fs = _interopRequireWildcard(require("fs"));
8
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
- /**
11
- * Copyright (c) Microsoft Corporation.
12
- *
13
- * Licensed under the Apache License, Version 2.0 (the "License");
14
- * you may not use this file except in compliance with the License.
15
- * You may obtain a copy of the License at
16
- *
17
- * http://www.apache.org/licenses/LICENSE-2.0
18
- *
19
- * Unless required by applicable law or agreed to in writing, software
20
- * distributed under the License is distributed on an "AS IS" BASIS,
21
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
- * See the License for the specific language governing permissions and
23
- * limitations under the License.
24
- */
25
-
26
- class ThrottledFile {
27
- constructor(file) {
28
- this._file = void 0;
29
- this._timer = void 0;
30
- this._text = void 0;
31
- this._file = file;
32
- }
33
- setContent(text) {
34
- this._text = text;
35
- if (!this._timer) this._timer = setTimeout(() => this.flush(), 250);
36
- }
37
- flush() {
38
- if (this._timer) {
39
- clearTimeout(this._timer);
40
- this._timer = undefined;
41
- }
42
- if (this._text) fs.writeFileSync(this._file, this._text);
43
- this._text = undefined;
44
- }
45
- }
46
- exports.ThrottledFile = ThrottledFile;
@@ -1,367 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Recorder = void 0;
7
- var fs = _interopRequireWildcard(require("fs"));
8
- var consoleApiSource = _interopRequireWildcard(require("../generated/consoleApiSource"));
9
- var _utils = require("../utils");
10
- var _locatorParser = require("../utils/isomorphic/locatorParser");
11
- var _browserContext = require("./browserContext");
12
- var _debugger = require("./debugger");
13
- var _contextRecorder = require("./recorder/contextRecorder");
14
- var _recorderUtils = require("./recorder/recorderUtils");
15
- var _selectorParser = require("../utils/isomorphic/selectorParser");
16
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
- /**
19
- * Copyright (c) Microsoft Corporation.
20
- *
21
- * Licensed under the Apache License, Version 2.0 (the "License");
22
- * you may not use this file except in compliance with the License.
23
- * You may obtain a copy of the License at
24
- *
25
- * http://www.apache.org/licenses/LICENSE-2.0
26
- *
27
- * Unless required by applicable law or agreed to in writing, software
28
- * distributed under the License is distributed on an "AS IS" BASIS,
29
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30
- * See the License for the specific language governing permissions and
31
- * limitations under the License.
32
- */
33
-
34
- const recorderSymbol = Symbol('recorderSymbol');
35
- class Recorder {
36
- static async showInspector(context, params, recorderAppFactory) {
37
- if ((0, _utils.isUnderTest)()) params.language = process.env.TEST_INSPECTOR_LANGUAGE;
38
- return await Recorder.show(context, recorderAppFactory, params);
39
- }
40
- static showInspectorNoReply(context, recorderAppFactory) {
41
- Recorder.showInspector(context, {}, recorderAppFactory).catch(() => {});
42
- }
43
- static show(context, recorderAppFactory, params) {
44
- let recorderPromise = context[recorderSymbol];
45
- if (!recorderPromise) {
46
- recorderPromise = Recorder._create(context, recorderAppFactory, params);
47
- context[recorderSymbol] = recorderPromise;
48
- }
49
- return recorderPromise;
50
- }
51
- static async _create(context, recorderAppFactory, params = {}) {
52
- const recorder = new Recorder(context, params);
53
- const recorderApp = await recorderAppFactory(recorder);
54
- await recorder._install(recorderApp);
55
- return recorder;
56
- }
57
- constructor(context, params) {
58
- this.handleSIGINT = void 0;
59
- this._context = void 0;
60
- this._mode = void 0;
61
- this._highlightedElement = {};
62
- this._overlayState = {
63
- offsetX: 0
64
- };
65
- this._recorderApp = null;
66
- this._currentCallsMetadata = new Map();
67
- this._recorderSources = [];
68
- this._userSources = new Map();
69
- this._debugger = void 0;
70
- this._contextRecorder = void 0;
71
- this._omitCallTracking = false;
72
- this._currentLanguage = void 0;
73
- this._mode = params.mode || 'none';
74
- this.handleSIGINT = params.handleSIGINT;
75
- this._contextRecorder = new _contextRecorder.ContextRecorder(context, params, {});
76
- this._context = context;
77
- this._omitCallTracking = !!params.omitCallTracking;
78
- this._debugger = context.debugger();
79
- context.instrumentation.addListener(this, context);
80
- this._currentLanguage = this._contextRecorder.languageName();
81
- if ((0, _utils.isUnderTest)()) {
82
- // Most of our tests put elements at the top left, so get out of the way.
83
- this._overlayState.offsetX = 200;
84
- }
85
- }
86
- async _install(recorderApp) {
87
- this._recorderApp = recorderApp;
88
- recorderApp.once('close', () => {
89
- this._debugger.resume(false);
90
- this._recorderApp = null;
91
- });
92
- recorderApp.on('event', data => {
93
- if (data.event === 'setMode') {
94
- this.setMode(data.params.mode);
95
- return;
96
- }
97
- if (data.event === 'highlightRequested') {
98
- if (data.params.selector) this.setHighlightedSelector(this._currentLanguage, data.params.selector);
99
- if (data.params.ariaTemplate) this.setHighlightedAriaTemplate(data.params.ariaTemplate);
100
- return;
101
- }
102
- if (data.event === 'step') {
103
- this._debugger.resume(true);
104
- return;
105
- }
106
- if (data.event === 'fileChanged') {
107
- this._currentLanguage = this._contextRecorder.languageName(data.params.file);
108
- this._refreshOverlay();
109
- return;
110
- }
111
- if (data.event === 'resume') {
112
- this._debugger.resume(false);
113
- return;
114
- }
115
- if (data.event === 'pause') {
116
- this._debugger.pauseOnNextStatement();
117
- return;
118
- }
119
- if (data.event === 'clear') {
120
- this._contextRecorder.clearScript();
121
- return;
122
- }
123
- if (data.event === 'runTask') {
124
- this._contextRecorder.runTask(data.params.task);
125
- return;
126
- }
127
- });
128
- await Promise.all([recorderApp.setMode(this._mode), recorderApp.setPaused(this._debugger.isPaused()), this._pushAllSources()]);
129
- this._context.once(_browserContext.BrowserContext.Events.Close, () => {
130
- var _this$_recorderApp;
131
- this._contextRecorder.dispose();
132
- this._context.instrumentation.removeListener(this);
133
- (_this$_recorderApp = this._recorderApp) === null || _this$_recorderApp === void 0 || _this$_recorderApp.close().catch(() => {});
134
- });
135
- this._contextRecorder.on(_contextRecorder.ContextRecorder.Events.Change, data => {
136
- this._recorderSources = data.sources;
137
- recorderApp.setActions(data.actions, data.sources);
138
- recorderApp.setRunningFile(undefined);
139
- this._pushAllSources();
140
- });
141
- await this._context.exposeBinding('__pw_recorderState', false, async source => {
142
- let actionSelector;
143
- let actionPoint;
144
- const hasActiveScreenshotCommand = [...this._currentCallsMetadata.keys()].some(isScreenshotCommand);
145
- if (!hasActiveScreenshotCommand) {
146
- actionSelector = await this._scopeHighlightedSelectorToFrame(source.frame);
147
- for (const [metadata, sdkObject] of this._currentCallsMetadata) {
148
- if (source.page === sdkObject.attribution.page) {
149
- actionPoint = metadata.point || actionPoint;
150
- actionSelector = actionSelector || metadata.params.selector;
151
- }
152
- }
153
- }
154
- const uiState = {
155
- mode: this._mode,
156
- actionPoint,
157
- actionSelector,
158
- ariaTemplate: this._highlightedElement.ariaTemplate,
159
- language: this._currentLanguage,
160
- testIdAttributeName: this._contextRecorder.testIdAttributeName(),
161
- overlay: this._overlayState
162
- };
163
- return uiState;
164
- });
165
- await this._context.exposeBinding('__pw_recorderElementPicked', false, async ({
166
- frame
167
- }, elementInfo) => {
168
- var _this$_recorderApp2;
169
- const selectorChain = await (0, _contextRecorder.generateFrameSelector)(frame);
170
- await ((_this$_recorderApp2 = this._recorderApp) === null || _this$_recorderApp2 === void 0 ? void 0 : _this$_recorderApp2.elementPicked({
171
- selector: (0, _recorderUtils.buildFullSelector)(selectorChain, elementInfo.selector),
172
- ariaSnapshot: elementInfo.ariaSnapshot
173
- }, true));
174
- });
175
- await this._context.exposeBinding('__pw_recorderSetMode', false, async ({
176
- frame
177
- }, mode) => {
178
- if (frame.parentFrame()) return;
179
- this.setMode(mode);
180
- });
181
- await this._context.exposeBinding('__pw_recorderSetOverlayState', false, async ({
182
- frame
183
- }, state) => {
184
- if (frame.parentFrame()) return;
185
- this._overlayState = state;
186
- });
187
- await this._context.exposeBinding('__pw_resume', false, () => {
188
- this._debugger.resume(false);
189
- });
190
- await this._context.extendInjectedScript(consoleApiSource.source);
191
- await this._contextRecorder.install();
192
- if (this._debugger.isPaused()) this._pausedStateChanged();
193
- this._debugger.on(_debugger.Debugger.Events.PausedStateChanged, () => this._pausedStateChanged());
194
- this._context.recorderAppForTest = this._recorderApp;
195
- }
196
- _pausedStateChanged() {
197
- var _this$_recorderApp3;
198
- // If we are called upon page.pause, we don't have metadatas, populate them.
199
- for (const {
200
- metadata,
201
- sdkObject
202
- } of this._debugger.pausedDetails()) {
203
- if (!this._currentCallsMetadata.has(metadata)) this.onBeforeCall(sdkObject, metadata);
204
- }
205
- (_this$_recorderApp3 = this._recorderApp) === null || _this$_recorderApp3 === void 0 || _this$_recorderApp3.setPaused(this._debugger.isPaused());
206
- this._updateUserSources();
207
- this.updateCallLog([...this._currentCallsMetadata.keys()]);
208
- }
209
- setMode(mode) {
210
- var _this$_recorderApp4;
211
- if (this._mode === mode) return;
212
- this._highlightedElement = {};
213
- this._mode = mode;
214
- (_this$_recorderApp4 = this._recorderApp) === null || _this$_recorderApp4 === void 0 || _this$_recorderApp4.setMode(this._mode);
215
- this._contextRecorder.setEnabled(this._isRecording());
216
- this._debugger.setMuted(this._isRecording());
217
- if (this._mode !== 'none' && this._mode !== 'standby' && this._context.pages().length === 1) this._context.pages()[0].bringToFront().catch(() => {});
218
- this._refreshOverlay();
219
- }
220
- resume() {
221
- this._debugger.resume(false);
222
- }
223
- mode() {
224
- return this._mode;
225
- }
226
- setHighlightedSelector(language, selector) {
227
- this._highlightedElement = {
228
- selector: (0, _locatorParser.locatorOrSelectorAsSelector)(language, selector, this._context.selectors().testIdAttributeName())
229
- };
230
- this._refreshOverlay();
231
- }
232
- setHighlightedAriaTemplate(ariaTemplate) {
233
- this._highlightedElement = {
234
- ariaTemplate
235
- };
236
- this._refreshOverlay();
237
- }
238
- hideHighlightedSelector() {
239
- this._highlightedElement = {};
240
- this._refreshOverlay();
241
- }
242
- async _scopeHighlightedSelectorToFrame(frame) {
243
- if (!this._highlightedElement.selector) return;
244
- try {
245
- const mainFrame = frame._page.mainFrame();
246
- const resolved = await mainFrame.selectors.resolveFrameForSelector(this._highlightedElement.selector);
247
- // selector couldn't be found, don't highlight anything
248
- if (!resolved) return '';
249
-
250
- // selector points to no specific frame, highlight in all frames
251
- if ((resolved === null || resolved === void 0 ? void 0 : resolved.frame) === mainFrame) return (0, _selectorParser.stringifySelector)(resolved.info.parsed);
252
-
253
- // selector points to this frame, highlight it
254
- if ((resolved === null || resolved === void 0 ? void 0 : resolved.frame) === frame) return (0, _selectorParser.stringifySelector)(resolved.info.parsed);
255
-
256
- // selector points to a different frame, highlight nothing
257
- return '';
258
- } catch {
259
- return '';
260
- }
261
- }
262
- setOutput(codegenId, outputFile) {
263
- this._contextRecorder.setOutput(codegenId, outputFile);
264
- }
265
- _refreshOverlay() {
266
- for (const page of this._context.pages()) {
267
- for (const frame of page.frames()) frame.evaluateExpression('window.__pw_refreshOverlay()').catch(() => {});
268
- }
269
- }
270
- async onBeforeCall(sdkObject, metadata) {
271
- if (this._omitCallTracking || this._isRecording()) return;
272
- this._currentCallsMetadata.set(metadata, sdkObject);
273
- this._updateUserSources();
274
- this.updateCallLog([metadata]);
275
- if (isScreenshotCommand(metadata)) this.hideHighlightedSelector();else if (metadata.params && metadata.params.selector) this._highlightedElement = {
276
- selector: metadata.params.selector
277
- };
278
- }
279
- async onAfterCall(sdkObject, metadata) {
280
- if (this._omitCallTracking || this._isRecording()) return;
281
- if (!metadata.error) this._currentCallsMetadata.delete(metadata);
282
- this._updateUserSources();
283
- this.updateCallLog([metadata]);
284
- }
285
- _updateUserSources() {
286
- var _this$_recorderApp5;
287
- // Remove old decorations.
288
- for (const source of this._userSources.values()) {
289
- source.highlight = [];
290
- source.revealLine = undefined;
291
- }
292
-
293
- // Apply new decorations.
294
- let fileToSelect = undefined;
295
- for (const metadata of this._currentCallsMetadata.keys()) {
296
- if (!metadata.location) continue;
297
- const {
298
- file,
299
- line
300
- } = metadata.location;
301
- let source = this._userSources.get(file);
302
- if (!source) {
303
- source = {
304
- isRecorded: false,
305
- label: file,
306
- id: file,
307
- text: this._readSource(file),
308
- highlight: [],
309
- language: languageForFile(file)
310
- };
311
- this._userSources.set(file, source);
312
- }
313
- if (line) {
314
- const paused = this._debugger.isPaused(metadata);
315
- source.highlight.push({
316
- line,
317
- type: metadata.error ? 'error' : paused ? 'paused' : 'running'
318
- });
319
- source.revealLine = line;
320
- fileToSelect = source.id;
321
- }
322
- }
323
- this._pushAllSources();
324
- if (fileToSelect) (_this$_recorderApp5 = this._recorderApp) === null || _this$_recorderApp5 === void 0 || _this$_recorderApp5.setRunningFile(fileToSelect);
325
- }
326
- _pushAllSources() {
327
- var _this$_recorderApp6;
328
- (_this$_recorderApp6 = this._recorderApp) === null || _this$_recorderApp6 === void 0 || _this$_recorderApp6.setSources([...this._recorderSources, ...this._userSources.values()]);
329
- }
330
- async onBeforeInputAction(sdkObject, metadata) {}
331
- async onCallLog(sdkObject, metadata, logName, message) {
332
- this.updateCallLog([metadata]);
333
- }
334
- updateCallLog(metadatas) {
335
- var _this$_recorderApp7;
336
- if (this._isRecording()) return;
337
- const logs = [];
338
- for (const metadata of metadatas) {
339
- if (!metadata.method || metadata.internal) continue;
340
- let status = 'done';
341
- if (this._currentCallsMetadata.has(metadata)) status = 'in-progress';
342
- if (this._debugger.isPaused(metadata)) status = 'paused';
343
- logs.push((0, _recorderUtils.metadataToCallLog)(metadata, status));
344
- }
345
- (_this$_recorderApp7 = this._recorderApp) === null || _this$_recorderApp7 === void 0 || _this$_recorderApp7.updateCallLogs(logs);
346
- }
347
- _isRecording() {
348
- return ['recording', 'assertingText', 'assertingVisibility', 'assertingValue', 'assertingSnapshot'].includes(this._mode);
349
- }
350
- _readSource(fileName) {
351
- try {
352
- return fs.readFileSync(fileName, 'utf-8');
353
- } catch (e) {
354
- return '// No source available';
355
- }
356
- }
357
- }
358
- exports.Recorder = Recorder;
359
- function isScreenshotCommand(metadata) {
360
- return metadata.method.toLowerCase().includes('screenshot');
361
- }
362
- function languageForFile(file) {
363
- if (file.endsWith('.py')) return 'python';
364
- if (file.endsWith('.java')) return 'java';
365
- if (file.endsWith('.cs')) return 'csharp';
366
- return 'javascript';
367
- }