easytouch-linux 1.0.7 → 1.0.17

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,194 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getAccessibilityTree = getAccessibilityTree;
7
- /**
8
- * Copyright (c) Microsoft Corporation.
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * http://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
-
23
- async function getAccessibilityTree(session, needle) {
24
- const objectId = needle ? needle._objectId : undefined;
25
- const {
26
- axNode
27
- } = await session.send('Page.accessibilitySnapshot', {
28
- objectId
29
- });
30
- const tree = new WKAXNode(axNode);
31
- return {
32
- tree,
33
- needle: needle ? tree._findNeedle() : null
34
- };
35
- }
36
- const WKRoleToARIARole = new Map(Object.entries({
37
- 'TextField': 'textbox'
38
- }));
39
-
40
- // WebKit localizes role descriptions on mac, but the english versions only add noise.
41
- const WKUnhelpfulRoleDescriptions = new Map(Object.entries({
42
- 'WebArea': 'HTML content',
43
- 'Summary': 'summary',
44
- 'DescriptionList': 'description list',
45
- 'ImageMap': 'image map',
46
- 'ListMarker': 'list marker',
47
- 'Video': 'video playback',
48
- 'Mark': 'highlighted',
49
- 'contentinfo': 'content information',
50
- 'Details': 'details',
51
- 'DescriptionListDetail': 'description',
52
- 'DescriptionListTerm': 'term',
53
- 'alertdialog': 'web alert dialog',
54
- 'dialog': 'web dialog',
55
- 'status': 'application status',
56
- 'tabpanel': 'tab panel',
57
- 'application': 'web application'
58
- }));
59
- class WKAXNode {
60
- constructor(payload) {
61
- this._payload = void 0;
62
- this._children = void 0;
63
- this._payload = payload;
64
- this._children = [];
65
- for (const payload of this._payload.children || []) this._children.push(new WKAXNode(payload));
66
- }
67
- children() {
68
- return this._children;
69
- }
70
- _findNeedle() {
71
- if (this._payload.found) return this;
72
- for (const child of this._children) {
73
- const found = child._findNeedle();
74
- if (found) return found;
75
- }
76
- return null;
77
- }
78
- isControl() {
79
- switch (this._payload.role) {
80
- case 'button':
81
- case 'checkbox':
82
- case 'ColorWell':
83
- case 'combobox':
84
- case 'DisclosureTriangle':
85
- case 'listbox':
86
- case 'menu':
87
- case 'menubar':
88
- case 'menuitem':
89
- case 'menuitemcheckbox':
90
- case 'menuitemradio':
91
- case 'radio':
92
- case 'scrollbar':
93
- case 'searchbox':
94
- case 'slider':
95
- case 'spinbutton':
96
- case 'switch':
97
- case 'tab':
98
- case 'textbox':
99
- case 'TextField':
100
- case 'tree':
101
- return true;
102
- default:
103
- return false;
104
- }
105
- }
106
- _isTextControl() {
107
- switch (this._payload.role) {
108
- case 'combobox':
109
- case 'searchfield':
110
- case 'textbox':
111
- case 'TextField':
112
- return true;
113
- }
114
- return false;
115
- }
116
- _name() {
117
- if (this._payload.role === 'text') return this._payload.value || '';
118
- return this._payload.name || '';
119
- }
120
- isInteresting(insideControl) {
121
- const {
122
- role,
123
- focusable
124
- } = this._payload;
125
- const name = this._name();
126
- if (role === 'ScrollArea') return false;
127
- if (role === 'WebArea') return true;
128
- if (focusable || role === 'MenuListOption') return true;
129
-
130
- // If it's not focusable but has a control role, then it's interesting.
131
- if (this.isControl()) return true;
132
-
133
- // A non focusable child of a control is not interesting
134
- if (insideControl) return false;
135
- return this.isLeafNode() && !!name;
136
- }
137
- _hasRedundantTextChild() {
138
- if (this._children.length !== 1) return false;
139
- const child = this._children[0];
140
- return child._payload.role === 'text' && this._payload.name === child._payload.value;
141
- }
142
- isLeafNode() {
143
- if (!this._children.length) return true;
144
- // WebKit on Linux ignores everything inside text controls, normalize this behavior
145
- if (this._isTextControl()) return true;
146
- // WebKit for mac has text nodes inside heading, li, menuitem, a, and p nodes
147
- if (this._hasRedundantTextChild()) return true;
148
- return false;
149
- }
150
- serialize() {
151
- const node = {
152
- role: WKRoleToARIARole.get(this._payload.role) || this._payload.role,
153
- name: this._name()
154
- };
155
- if ('description' in this._payload && this._payload.description !== node.name) node.description = this._payload.description;
156
- if ('roledescription' in this._payload) {
157
- const roledescription = this._payload.roledescription;
158
- if (roledescription !== this._payload.role && WKUnhelpfulRoleDescriptions.get(this._payload.role) !== roledescription) node.roledescription = roledescription;
159
- }
160
- if ('value' in this._payload && this._payload.role !== 'text') {
161
- if (typeof this._payload.value === 'string') node.valueString = this._payload.value;else if (typeof this._payload.value === 'number') node.valueNumber = this._payload.value;
162
- }
163
- if ('checked' in this._payload) node.checked = this._payload.checked === 'true' ? 'checked' : this._payload.checked === 'false' ? 'unchecked' : 'mixed';
164
- if ('pressed' in this._payload) node.pressed = this._payload.pressed === 'true' ? 'pressed' : this._payload.pressed === 'false' ? 'released' : 'mixed';
165
- const userStringProperties = ['keyshortcuts', 'valuetext'];
166
- for (const userStringProperty of userStringProperties) {
167
- if (!(userStringProperty in this._payload)) continue;
168
- node[userStringProperty] = this._payload[userStringProperty];
169
- }
170
- const booleanProperties = ['disabled', 'expanded', 'focused', 'modal', 'multiselectable', 'readonly', 'required', 'selected'];
171
- for (const booleanProperty of booleanProperties) {
172
- // WebArea and ScrollArea treat focus differently than other nodes. They report whether their frame has focus,
173
- // not whether focus is specifically on the root node.
174
- if (booleanProperty === 'focused' && (this._payload.role === 'WebArea' || this._payload.role === 'ScrollArea')) continue;
175
- const value = this._payload[booleanProperty];
176
- if (!value) continue;
177
- node[booleanProperty] = value;
178
- }
179
- const numericalProperties = ['level', 'valuemax', 'valuemin'];
180
- for (const numericalProperty of numericalProperties) {
181
- if (!(numericalProperty in this._payload)) continue;
182
- node[numericalProperty] = this._payload[numericalProperty];
183
- }
184
- const tokenProperties = ['autocomplete', 'haspopup', 'invalid'];
185
- for (const tokenProperty of tokenProperties) {
186
- const value = this._payload[tokenProperty];
187
- if (!value || value === 'false') continue;
188
- node[tokenProperty] = value;
189
- }
190
- const orientationIsApplicable = new Set(['ScrollArea', 'scrollbar', 'listbox', 'combobox', 'menu', 'tree', 'separator', 'slider', 'tablist', 'toolbar']);
191
- if (this._payload.orientation && orientationIsApplicable.has(this._payload.role)) node.orientation = this._payload.orientation;
192
- return node;
193
- }
194
- }
@@ -1,329 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.WKBrowserContext = exports.WKBrowser = void 0;
7
- var _browser = require("../browser");
8
- var _browserContext = require("../browserContext");
9
- var _utils = require("../../utils");
10
- var network = _interopRequireWildcard(require("../network"));
11
- var _wkConnection = require("./wkConnection");
12
- var _wkPage = require("./wkPage");
13
- var _errors = require("../errors");
14
- 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); }
15
- 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; }
16
- /**
17
- * Copyright 2017 Google Inc. All rights reserved.
18
- * Modifications copyright (c) Microsoft Corporation.
19
- *
20
- * Licensed under the Apache License, Version 2.0 (the "License");
21
- * you may not use this file except in compliance with the License.
22
- * You may obtain a copy of the License at
23
- *
24
- * http://www.apache.org/licenses/LICENSE-2.0
25
- *
26
- * Unless required by applicable law or agreed to in writing, software
27
- * distributed under the License is distributed on an "AS IS" BASIS,
28
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
- * See the License for the specific language governing permissions and
30
- * limitations under the License.
31
- */
32
-
33
- const DEFAULT_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.2 Safari/605.1.15';
34
- const BROWSER_VERSION = '18.2';
35
- class WKBrowser extends _browser.Browser {
36
- static async connect(parent, transport, options) {
37
- const browser = new WKBrowser(parent, transport, options);
38
- if (options.__testHookOnConnectToBrowser) await options.__testHookOnConnectToBrowser();
39
- const promises = [browser._browserSession.send('Playwright.enable')];
40
- if (options.persistent) {
41
- var _options$persistent;
42
- (_options$persistent = options.persistent).userAgent || (_options$persistent.userAgent = DEFAULT_USER_AGENT);
43
- browser._defaultContext = new WKBrowserContext(browser, undefined, options.persistent);
44
- promises.push(browser._defaultContext._initialize());
45
- }
46
- await Promise.all(promises);
47
- return browser;
48
- }
49
- constructor(parent, transport, options) {
50
- super(parent, options);
51
- this._connection = void 0;
52
- this._browserSession = void 0;
53
- this._contexts = new Map();
54
- this._wkPages = new Map();
55
- this._connection = new _wkConnection.WKConnection(transport, this._onDisconnect.bind(this), options.protocolLogger, options.browserLogsCollector);
56
- this._browserSession = this._connection.browserSession;
57
- this._browserSession.on('Playwright.pageProxyCreated', this._onPageProxyCreated.bind(this));
58
- this._browserSession.on('Playwright.pageProxyDestroyed', this._onPageProxyDestroyed.bind(this));
59
- this._browserSession.on('Playwright.provisionalLoadFailed', event => this._onProvisionalLoadFailed(event));
60
- this._browserSession.on('Playwright.windowOpen', event => this._onWindowOpen(event));
61
- this._browserSession.on('Playwright.downloadCreated', this._onDownloadCreated.bind(this));
62
- this._browserSession.on('Playwright.downloadFilenameSuggested', this._onDownloadFilenameSuggested.bind(this));
63
- this._browserSession.on('Playwright.downloadFinished', this._onDownloadFinished.bind(this));
64
- this._browserSession.on('Playwright.screencastFinished', this._onScreencastFinished.bind(this));
65
- this._browserSession.on(_wkConnection.kPageProxyMessageReceived, this._onPageProxyMessageReceived.bind(this));
66
- }
67
- _onDisconnect() {
68
- for (const wkPage of this._wkPages.values()) wkPage.didClose();
69
- this._wkPages.clear();
70
- for (const video of this._idToVideo.values()) video.artifact.reportFinished(new _errors.TargetClosedError());
71
- this._idToVideo.clear();
72
- this._didClose();
73
- }
74
- async doCreateNewContext(options) {
75
- const proxy = options.proxyOverride || options.proxy;
76
- const createOptions = proxy ? {
77
- // Enable socks5 hostname resolution on Windows.
78
- // See https://github.com/microsoft/playwright/issues/20451
79
- proxyServer: process.platform === 'win32' ? proxy.server.replace(/^socks5:\/\//, 'socks5h://') : proxy.server,
80
- proxyBypassList: proxy.bypass
81
- } : undefined;
82
- const {
83
- browserContextId
84
- } = await this._browserSession.send('Playwright.createContext', createOptions);
85
- options.userAgent = options.userAgent || DEFAULT_USER_AGENT;
86
- const context = new WKBrowserContext(this, browserContextId, options);
87
- await context._initialize();
88
- this._contexts.set(browserContextId, context);
89
- return context;
90
- }
91
- contexts() {
92
- return Array.from(this._contexts.values());
93
- }
94
- version() {
95
- return BROWSER_VERSION;
96
- }
97
- userAgent() {
98
- return DEFAULT_USER_AGENT;
99
- }
100
- _onDownloadCreated(payload) {
101
- const page = this._wkPages.get(payload.pageProxyId);
102
- if (!page) return;
103
- // In some cases, e.g. blob url download, we receive only frameScheduledNavigation
104
- // but no signals that the navigation was canceled and replaced by download. Fix it
105
- // here by simulating cancelled provisional load which matches downloads from network.
106
- //
107
- // TODO: this is racy, because download might be unrelated any navigation, and we will
108
- // abort navigation that is still running. We should be able to fix this by
109
- // instrumenting policy decision start/proceed/cancel.
110
- page._page._frameManager.frameAbortedNavigation(payload.frameId, 'Download is starting');
111
- let originPage = page._page.initializedOrUndefined();
112
- // If it's a new window download, report it on the opener page.
113
- if (!originPage) {
114
- // Resume the page creation with an error. The page will automatically close right
115
- // after the download begins.
116
- page._firstNonInitialNavigationCommittedReject(new Error('Starting new page download'));
117
- if (page._opener) originPage = page._opener._page.initializedOrUndefined();
118
- }
119
- if (!originPage) return;
120
- this._downloadCreated(originPage, payload.uuid, payload.url);
121
- }
122
- _onDownloadFilenameSuggested(payload) {
123
- this._downloadFilenameSuggested(payload.uuid, payload.suggestedFilename);
124
- }
125
- _onDownloadFinished(payload) {
126
- this._downloadFinished(payload.uuid, payload.error);
127
- }
128
- _onScreencastFinished(payload) {
129
- var _this$_takeVideo;
130
- (_this$_takeVideo = this._takeVideo(payload.screencastId)) === null || _this$_takeVideo === void 0 || _this$_takeVideo.reportFinished();
131
- }
132
- _onPageProxyCreated(event) {
133
- const pageProxyId = event.pageProxyId;
134
- let context = null;
135
- if (event.browserContextId) {
136
- // FIXME: we don't know about the default context id, so assume that all targets from
137
- // unknown contexts are created in the 'default' context which can in practice be represented
138
- // by multiple actual contexts in WebKit. Solving this properly will require adding context
139
- // lifecycle events.
140
- context = this._contexts.get(event.browserContextId) || null;
141
- }
142
- if (!context) context = this._defaultContext;
143
- if (!context) return;
144
- const pageProxySession = new _wkConnection.WKSession(this._connection, pageProxyId, message => {
145
- this._connection.rawSend({
146
- ...message,
147
- pageProxyId
148
- });
149
- });
150
- const opener = event.openerId ? this._wkPages.get(event.openerId) : undefined;
151
- const wkPage = new _wkPage.WKPage(context, pageProxySession, opener || null);
152
- this._wkPages.set(pageProxyId, wkPage);
153
- }
154
- _onPageProxyDestroyed(event) {
155
- const pageProxyId = event.pageProxyId;
156
- const wkPage = this._wkPages.get(pageProxyId);
157
- if (!wkPage) return;
158
- wkPage.didClose();
159
- this._wkPages.delete(pageProxyId);
160
- }
161
- _onPageProxyMessageReceived(event) {
162
- const wkPage = this._wkPages.get(event.pageProxyId);
163
- if (!wkPage) return;
164
- wkPage.dispatchMessageToSession(event.message);
165
- }
166
- _onProvisionalLoadFailed(event) {
167
- const wkPage = this._wkPages.get(event.pageProxyId);
168
- if (!wkPage) return;
169
- wkPage.handleProvisionalLoadFailed(event);
170
- }
171
- _onWindowOpen(event) {
172
- const wkPage = this._wkPages.get(event.pageProxyId);
173
- if (!wkPage) return;
174
- wkPage.handleWindowOpen(event);
175
- }
176
- isConnected() {
177
- return !this._connection.isClosed();
178
- }
179
- }
180
- exports.WKBrowser = WKBrowser;
181
- class WKBrowserContext extends _browserContext.BrowserContext {
182
- constructor(browser, browserContextId, options) {
183
- super(browser, options, browserContextId);
184
- this._validateEmulatedViewport(options.viewport);
185
- this._authenticateProxyViaHeader();
186
- }
187
- async _initialize() {
188
- (0, _utils.assert)(!this._wkPages().length);
189
- const browserContextId = this._browserContextId;
190
- const promises = [super._initialize()];
191
- promises.push(this._browser._browserSession.send('Playwright.setDownloadBehavior', {
192
- behavior: this._options.acceptDownloads === 'accept' ? 'allow' : 'deny',
193
- downloadPath: this._browser.options.downloadsPath,
194
- browserContextId
195
- }));
196
- if (this._options.ignoreHTTPSErrors || this._options.internalIgnoreHTTPSErrors) promises.push(this._browser._browserSession.send('Playwright.setIgnoreCertificateErrors', {
197
- browserContextId,
198
- ignore: true
199
- }));
200
- if (this._options.locale) promises.push(this._browser._browserSession.send('Playwright.setLanguages', {
201
- browserContextId,
202
- languages: [this._options.locale]
203
- }));
204
- if (this._options.geolocation) promises.push(this.setGeolocation(this._options.geolocation));
205
- if (this._options.offline) promises.push(this.setOffline(this._options.offline));
206
- if (this._options.httpCredentials) promises.push(this.setHTTPCredentials(this._options.httpCredentials));
207
- await Promise.all(promises);
208
- }
209
- _wkPages() {
210
- return Array.from(this._browser._wkPages.values()).filter(wkPage => wkPage._browserContext === this);
211
- }
212
- possiblyUninitializedPages() {
213
- return this._wkPages().map(wkPage => wkPage._page);
214
- }
215
- async doCreateNewPage() {
216
- (0, _browserContext.assertBrowserContextIsNotOwned)(this);
217
- const {
218
- pageProxyId
219
- } = await this._browser._browserSession.send('Playwright.createPage', {
220
- browserContextId: this._browserContextId
221
- });
222
- return this._browser._wkPages.get(pageProxyId)._page;
223
- }
224
- async doGetCookies(urls) {
225
- const {
226
- cookies
227
- } = await this._browser._browserSession.send('Playwright.getAllCookies', {
228
- browserContextId: this._browserContextId
229
- });
230
- return network.filterCookies(cookies.map(c => {
231
- const copy = {
232
- ...c
233
- };
234
- copy.expires = c.expires === -1 ? -1 : c.expires / 1000;
235
- delete copy.session;
236
- return copy;
237
- }), urls);
238
- }
239
- async addCookies(cookies) {
240
- const cc = network.rewriteCookies(cookies).map(c => ({
241
- ...c,
242
- session: c.expires === -1 || c.expires === undefined,
243
- expires: c.expires && c.expires !== -1 ? c.expires * 1000 : c.expires
244
- }));
245
- await this._browser._browserSession.send('Playwright.setCookies', {
246
- cookies: cc,
247
- browserContextId: this._browserContextId
248
- });
249
- }
250
- async doClearCookies() {
251
- await this._browser._browserSession.send('Playwright.deleteAllCookies', {
252
- browserContextId: this._browserContextId
253
- });
254
- }
255
- async doGrantPermissions(origin, permissions) {
256
- await Promise.all(this.pages().map(page => page._delegate._grantPermissions(origin, permissions)));
257
- }
258
- async doClearPermissions() {
259
- await Promise.all(this.pages().map(page => page._delegate._clearPermissions()));
260
- }
261
- async setGeolocation(geolocation) {
262
- (0, _browserContext.verifyGeolocation)(geolocation);
263
- this._options.geolocation = geolocation;
264
- const payload = geolocation ? {
265
- ...geolocation,
266
- timestamp: Date.now()
267
- } : undefined;
268
- await this._browser._browserSession.send('Playwright.setGeolocationOverride', {
269
- browserContextId: this._browserContextId,
270
- geolocation: payload
271
- });
272
- }
273
- async setExtraHTTPHeaders(headers) {
274
- this._options.extraHTTPHeaders = headers;
275
- for (const page of this.pages()) await page._delegate.updateExtraHTTPHeaders();
276
- }
277
- async setUserAgent(userAgent) {
278
- this._options.userAgent = userAgent;
279
- for (const page of this.pages()) await page._delegate.updateUserAgent();
280
- }
281
- async setOffline(offline) {
282
- this._options.offline = offline;
283
- for (const page of this.pages()) await page._delegate.updateOffline();
284
- }
285
- async doSetHTTPCredentials(httpCredentials) {
286
- this._options.httpCredentials = httpCredentials;
287
- for (const page of this.pages()) await page._delegate.updateHttpCredentials();
288
- }
289
- async doAddInitScript(initScript) {
290
- for (const page of this.pages()) await page._delegate._updateBootstrapScript();
291
- }
292
- async doRemoveNonInternalInitScripts() {
293
- for (const page of this.pages()) await page._delegate._updateBootstrapScript();
294
- }
295
- async doUpdateRequestInterception() {
296
- for (const page of this.pages()) await page._delegate.updateRequestInterception();
297
- }
298
- onClosePersistent() {}
299
- async clearCache() {
300
- // We use ephemeral contexts so there is no disk cache.
301
- await this._browser._browserSession.send('Playwright.clearMemoryCache', {
302
- browserContextId: this._browserContextId
303
- });
304
- }
305
- async doClose(reason) {
306
- if (!this._browserContextId) {
307
- await Promise.all(this._wkPages().map(wkPage => wkPage._stopVideo()));
308
- // Closing persistent context should close the browser.
309
- await this._browser.close({
310
- reason
311
- });
312
- } else {
313
- await this._browser._browserSession.send('Playwright.deleteContext', {
314
- browserContextId: this._browserContextId
315
- });
316
- this._browser._contexts.delete(this._browserContextId);
317
- }
318
- }
319
- async cancelDownload(uuid) {
320
- await this._browser._browserSession.send('Playwright.cancelDownload', {
321
- uuid
322
- });
323
- }
324
- _validateEmulatedViewport(viewportSize) {
325
- if (!viewportSize) return;
326
- if (process.platform === 'win32' && this._browser.options.headful && (viewportSize.width < 250 || viewportSize.height < 240)) throw new Error(`WebKit on Windows has a minimal viewport of 250x240.`);
327
- }
328
- }
329
- exports.WKBrowserContext = WKBrowserContext;
@@ -1,173 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.kPageProxyMessageReceived = exports.kBrowserCloseMessageId = exports.WKSession = exports.WKConnection = void 0;
7
- var _events = require("events");
8
- var _utils = require("../../utils");
9
- var _debugLogger = require("../../utils/debugLogger");
10
- var _helper = require("../helper");
11
- var _protocolError = require("../protocolError");
12
- /**
13
- * Copyright 2017 Google Inc. All rights reserved.
14
- * Modifications copyright (c) Microsoft Corporation.
15
- *
16
- * Licensed under the Apache License, Version 2.0 (the "License");
17
- * you may not use this file except in compliance with the License.
18
- * You may obtain a copy of the License at
19
- *
20
- * http://www.apache.org/licenses/LICENSE-2.0
21
- *
22
- * Unless required by applicable law or agreed to in writing, software
23
- * distributed under the License is distributed on an "AS IS" BASIS,
24
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25
- * See the License for the specific language governing permissions and
26
- * limitations under the License.
27
- */
28
-
29
- // WKPlaywright uses this special id to issue Browser.close command which we
30
- // should ignore.
31
- const kBrowserCloseMessageId = exports.kBrowserCloseMessageId = -9999;
32
-
33
- // We emulate kPageProxyMessageReceived message to unify it with Browser.pageProxyCreated
34
- // and Browser.pageProxyDestroyed for easier management.
35
- const kPageProxyMessageReceived = exports.kPageProxyMessageReceived = Symbol('kPageProxyMessageReceived');
36
- class WKConnection {
37
- constructor(transport, onDisconnect, protocolLogger, browserLogsCollector) {
38
- this._transport = void 0;
39
- this._onDisconnect = void 0;
40
- this._protocolLogger = void 0;
41
- this._browserLogsCollector = void 0;
42
- this._browserDisconnectedLogs = void 0;
43
- this._lastId = 0;
44
- this._closed = false;
45
- this.browserSession = void 0;
46
- this._transport = transport;
47
- this._onDisconnect = onDisconnect;
48
- this._protocolLogger = protocolLogger;
49
- this._browserLogsCollector = browserLogsCollector;
50
- this.browserSession = new WKSession(this, '', message => {
51
- this.rawSend(message);
52
- });
53
- this._transport.onmessage = this._dispatchMessage.bind(this);
54
- // onclose should be set last, since it can be immediately called.
55
- this._transport.onclose = this._onClose.bind(this);
56
- }
57
- nextMessageId() {
58
- return ++this._lastId;
59
- }
60
- rawSend(message) {
61
- this._protocolLogger('send', message);
62
- this._transport.send(message);
63
- }
64
- _dispatchMessage(message) {
65
- this._protocolLogger('receive', message);
66
- if (message.id === kBrowserCloseMessageId) return;
67
- if (message.pageProxyId) {
68
- const payload = {
69
- message: message,
70
- pageProxyId: message.pageProxyId
71
- };
72
- this.browserSession.dispatchMessage({
73
- method: kPageProxyMessageReceived,
74
- params: payload
75
- });
76
- return;
77
- }
78
- this.browserSession.dispatchMessage(message);
79
- }
80
- _onClose(reason) {
81
- this._closed = true;
82
- this._transport.onmessage = undefined;
83
- this._transport.onclose = undefined;
84
- this._browserDisconnectedLogs = _helper.helper.formatBrowserLogs(this._browserLogsCollector.recentLogs(), reason);
85
- this.browserSession.dispose();
86
- this._onDisconnect();
87
- }
88
- isClosed() {
89
- return this._closed;
90
- }
91
- close() {
92
- if (!this._closed) this._transport.close();
93
- }
94
- }
95
- exports.WKConnection = WKConnection;
96
- class WKSession extends _events.EventEmitter {
97
- constructor(connection, sessionId, rawSend) {
98
- super();
99
- this.connection = void 0;
100
- this.sessionId = void 0;
101
- this._disposed = false;
102
- this._rawSend = void 0;
103
- this._callbacks = new Map();
104
- this._crashed = false;
105
- this.on = void 0;
106
- this.addListener = void 0;
107
- this.off = void 0;
108
- this.removeListener = void 0;
109
- this.once = void 0;
110
- this.setMaxListeners(0);
111
- this.connection = connection;
112
- this.sessionId = sessionId;
113
- this._rawSend = rawSend;
114
- this.on = super.on;
115
- this.off = super.removeListener;
116
- this.addListener = super.addListener;
117
- this.removeListener = super.removeListener;
118
- this.once = super.once;
119
- }
120
- async send(method, params) {
121
- if (this._crashed || this._disposed || this.connection._browserDisconnectedLogs) throw new _protocolError.ProtocolError(this._crashed ? 'crashed' : 'closed', undefined, this.connection._browserDisconnectedLogs);
122
- const id = this.connection.nextMessageId();
123
- const messageObj = {
124
- id,
125
- method,
126
- params
127
- };
128
- this._rawSend(messageObj);
129
- return new Promise((resolve, reject) => {
130
- this._callbacks.set(id, {
131
- resolve,
132
- reject,
133
- error: new _protocolError.ProtocolError('error', method)
134
- });
135
- });
136
- }
137
- sendMayFail(method, params) {
138
- return this.send(method, params).catch(error => _debugLogger.debugLogger.log('error', error));
139
- }
140
- markAsCrashed() {
141
- this._crashed = true;
142
- }
143
- isDisposed() {
144
- return this._disposed;
145
- }
146
- dispose() {
147
- for (const callback of this._callbacks.values()) {
148
- callback.error.type = this._crashed ? 'crashed' : 'closed';
149
- callback.error.logs = this.connection._browserDisconnectedLogs;
150
- callback.reject(callback.error);
151
- }
152
- this._callbacks.clear();
153
- this._disposed = true;
154
- }
155
- dispatchMessage(object) {
156
- if (object.id && this._callbacks.has(object.id)) {
157
- const callback = this._callbacks.get(object.id);
158
- this._callbacks.delete(object.id);
159
- if (object.error) {
160
- callback.error.setMessage(object.error.message);
161
- callback.reject(callback.error);
162
- } else {
163
- callback.resolve(object.result);
164
- }
165
- } else if (object.id && !object.error) {
166
- // Response might come after session has been disposed and rejected all callbacks.
167
- (0, _utils.assert)(this.isDisposed());
168
- } else {
169
- Promise.resolve().then(() => this.emit(object.method, object.params));
170
- }
171
- }
172
- }
173
- exports.WKSession = WKSession;