webdriverio 7.16.16 → 7.17.0

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 (358) hide show
  1. package/package.json +7 -7
  2. package/build/commands/browser/$$.d.ts +0 -50
  3. package/build/commands/browser/$$.d.ts.map +0 -1
  4. package/build/commands/browser/$$.js +0 -57
  5. package/build/commands/browser/$.d.ts +0 -77
  6. package/build/commands/browser/$.d.ts.map +0 -1
  7. package/build/commands/browser/$.js +0 -91
  8. package/build/commands/browser/addCommand.d.ts +0 -37
  9. package/build/commands/browser/addCommand.d.ts.map +0 -1
  10. package/build/commands/browser/addCommand.js +0 -37
  11. package/build/commands/browser/call.d.ts +0 -42
  12. package/build/commands/browser/call.d.ts.map +0 -1
  13. package/build/commands/browser/call.js +0 -49
  14. package/build/commands/browser/custom$$.d.ts +0 -26
  15. package/build/commands/browser/custom$$.d.ts.map +0 -1
  16. package/build/commands/browser/custom$$.js +0 -47
  17. package/build/commands/browser/custom$.d.ts +0 -25
  18. package/build/commands/browser/custom$.d.ts.map +0 -1
  19. package/build/commands/browser/custom$.js +0 -47
  20. package/build/commands/browser/debug.d.ts +0 -32
  21. package/build/commands/browser/debug.d.ts.map +0 -1
  22. package/build/commands/browser/debug.js +0 -108
  23. package/build/commands/browser/deleteCookies.d.ts +0 -45
  24. package/build/commands/browser/deleteCookies.d.ts.map +0 -1
  25. package/build/commands/browser/deleteCookies.js +0 -56
  26. package/build/commands/browser/execute.d.ts +0 -37
  27. package/build/commands/browser/execute.d.ts.map +0 -1
  28. package/build/commands/browser/execute.js +0 -55
  29. package/build/commands/browser/executeAsync.d.ts +0 -45
  30. package/build/commands/browser/executeAsync.d.ts.map +0 -1
  31. package/build/commands/browser/executeAsync.js +0 -63
  32. package/build/commands/browser/getCookies.d.ts +0 -34
  33. package/build/commands/browser/getCookies.d.ts.map +0 -1
  34. package/build/commands/browser/getCookies.js +0 -46
  35. package/build/commands/browser/getPuppeteer.d.ts +0 -38
  36. package/build/commands/browser/getPuppeteer.d.ts.map +0 -1
  37. package/build/commands/browser/getPuppeteer.js +0 -119
  38. package/build/commands/browser/getWindowSize.d.ts +0 -25
  39. package/build/commands/browser/getWindowSize.d.ts.map +0 -1
  40. package/build/commands/browser/getWindowSize.js +0 -30
  41. package/build/commands/browser/keys.d.ts +0 -28
  42. package/build/commands/browser/keys.d.ts.map +0 -1
  43. package/build/commands/browser/keys.js +0 -64
  44. package/build/commands/browser/mock.d.ts +0 -111
  45. package/build/commands/browser/mock.d.ts.map +0 -1
  46. package/build/commands/browser/mock.js +0 -164
  47. package/build/commands/browser/mockClearAll.d.ts +0 -28
  48. package/build/commands/browser/mockClearAll.d.ts.map +0 -1
  49. package/build/commands/browser/mockClearAll.js +0 -43
  50. package/build/commands/browser/mockRestoreAll.d.ts +0 -26
  51. package/build/commands/browser/mockRestoreAll.d.ts.map +0 -1
  52. package/build/commands/browser/mockRestoreAll.js +0 -41
  53. package/build/commands/browser/newWindow.d.ts +0 -41
  54. package/build/commands/browser/newWindow.d.ts.map +0 -1
  55. package/build/commands/browser/newWindow.js +0 -83
  56. package/build/commands/browser/overwriteCommand.d.ts +0 -32
  57. package/build/commands/browser/overwriteCommand.d.ts.map +0 -1
  58. package/build/commands/browser/overwriteCommand.js +0 -32
  59. package/build/commands/browser/pause.d.ts +0 -23
  60. package/build/commands/browser/pause.d.ts.map +0 -1
  61. package/build/commands/browser/pause.js +0 -27
  62. package/build/commands/browser/react$$.d.ts +0 -36
  63. package/build/commands/browser/react$$.d.ts.map +0 -1
  64. package/build/commands/browser/react$$.js +0 -51
  65. package/build/commands/browser/react$.d.ts +0 -46
  66. package/build/commands/browser/react$.d.ts.map +0 -1
  67. package/build/commands/browser/react$.js +0 -59
  68. package/build/commands/browser/reloadSession.d.ts +0 -23
  69. package/build/commands/browser/reloadSession.d.ts.map +0 -1
  70. package/build/commands/browser/reloadSession.js +0 -58
  71. package/build/commands/browser/savePDF.d.ts +0 -46
  72. package/build/commands/browser/savePDF.d.ts.map +0 -1
  73. package/build/commands/browser/savePDF.js +0 -51
  74. package/build/commands/browser/saveRecordingScreen.d.ts +0 -28
  75. package/build/commands/browser/saveRecordingScreen.d.ts.map +0 -1
  76. package/build/commands/browser/saveRecordingScreen.js +0 -47
  77. package/build/commands/browser/saveScreenshot.d.ts +0 -22
  78. package/build/commands/browser/saveScreenshot.d.ts.map +0 -1
  79. package/build/commands/browser/saveScreenshot.js +0 -41
  80. package/build/commands/browser/setCookies.d.ts +0 -57
  81. package/build/commands/browser/setCookies.d.ts.map +0 -1
  82. package/build/commands/browser/setCookies.js +0 -66
  83. package/build/commands/browser/setTimeout.d.ts +0 -31
  84. package/build/commands/browser/setTimeout.d.ts.map +0 -1
  85. package/build/commands/browser/setTimeout.js +0 -61
  86. package/build/commands/browser/setWindowSize.d.ts +0 -20
  87. package/build/commands/browser/setWindowSize.d.ts.map +0 -1
  88. package/build/commands/browser/setWindowSize.js +0 -43
  89. package/build/commands/browser/switchWindow.d.ts +0 -30
  90. package/build/commands/browser/switchWindow.d.ts.map +0 -1
  91. package/build/commands/browser/switchWindow.js +0 -73
  92. package/build/commands/browser/throttle.d.ts +0 -3
  93. package/build/commands/browser/throttle.d.ts.map +0 -1
  94. package/build/commands/browser/throttle.js +0 -144
  95. package/build/commands/browser/touchAction.d.ts +0 -61
  96. package/build/commands/browser/touchAction.d.ts.map +0 -1
  97. package/build/commands/browser/touchAction.js +0 -65
  98. package/build/commands/browser/uploadFile.d.ts +0 -32
  99. package/build/commands/browser/uploadFile.d.ts.map +0 -1
  100. package/build/commands/browser/uploadFile.js +0 -63
  101. package/build/commands/browser/url.d.ts +0 -38
  102. package/build/commands/browser/url.d.ts.map +0 -1
  103. package/build/commands/browser/url.js +0 -49
  104. package/build/commands/browser/waitUntil.d.ts +0 -44
  105. package/build/commands/browser/waitUntil.d.ts.map +0 -1
  106. package/build/commands/browser/waitUntil.js +0 -73
  107. package/build/commands/browser.d.ts +0 -70
  108. package/build/commands/browser.d.ts.map +0 -1
  109. package/build/commands/browser.js +0 -44
  110. package/build/commands/constant.d.ts +0 -19
  111. package/build/commands/constant.d.ts.map +0 -1
  112. package/build/commands/constant.js +0 -91
  113. package/build/commands/element/$$.d.ts +0 -46
  114. package/build/commands/element/$$.d.ts.map +0 -1
  115. package/build/commands/element/$$.js +0 -50
  116. package/build/commands/element/$.d.ts +0 -72
  117. package/build/commands/element/$.d.ts.map +0 -1
  118. package/build/commands/element/$.js +0 -76
  119. package/build/commands/element/addValue.d.ts +0 -33
  120. package/build/commands/element/addValue.d.ts.map +0 -1
  121. package/build/commands/element/addValue.js +0 -48
  122. package/build/commands/element/clearValue.d.ts +0 -28
  123. package/build/commands/element/clearValue.d.ts.map +0 -1
  124. package/build/commands/element/clearValue.js +0 -32
  125. package/build/commands/element/click.d.ts +0 -73
  126. package/build/commands/element/click.d.ts.map +0 -1
  127. package/build/commands/element/click.js +0 -134
  128. package/build/commands/element/custom$$.d.ts +0 -28
  129. package/build/commands/element/custom$$.d.ts.map +0 -1
  130. package/build/commands/element/custom$$.js +0 -57
  131. package/build/commands/element/custom$.d.ts +0 -27
  132. package/build/commands/element/custom$.d.ts.map +0 -1
  133. package/build/commands/element/custom$.js +0 -57
  134. package/build/commands/element/doubleClick.d.ts +0 -25
  135. package/build/commands/element/doubleClick.d.ts.map +0 -1
  136. package/build/commands/element/doubleClick.js +0 -51
  137. package/build/commands/element/dragAndDrop.d.ts +0 -41
  138. package/build/commands/element/dragAndDrop.d.ts.map +0 -1
  139. package/build/commands/element/dragAndDrop.js +0 -98
  140. package/build/commands/element/getAttribute.d.ts +0 -28
  141. package/build/commands/element/getAttribute.d.ts.map +0 -1
  142. package/build/commands/element/getAttribute.js +0 -32
  143. package/build/commands/element/getCSSProperty.d.ts +0 -71
  144. package/build/commands/element/getCSSProperty.d.ts.map +0 -1
  145. package/build/commands/element/getCSSProperty.js +0 -108
  146. package/build/commands/element/getComputedLabel.d.ts +0 -20
  147. package/build/commands/element/getComputedLabel.d.ts.map +0 -1
  148. package/build/commands/element/getComputedLabel.js +0 -24
  149. package/build/commands/element/getComputedRole.d.ts +0 -20
  150. package/build/commands/element/getComputedRole.d.ts.map +0 -1
  151. package/build/commands/element/getComputedRole.js +0 -24
  152. package/build/commands/element/getHTML.d.ts +0 -32
  153. package/build/commands/element/getHTML.d.ts.map +0 -1
  154. package/build/commands/element/getHTML.js +0 -46
  155. package/build/commands/element/getLocation.d.ts +0 -6
  156. package/build/commands/element/getLocation.d.ts.map +0 -1
  157. package/build/commands/element/getLocation.js +0 -46
  158. package/build/commands/element/getProperty.d.ts +0 -53
  159. package/build/commands/element/getProperty.d.ts.map +0 -1
  160. package/build/commands/element/getProperty.js +0 -31
  161. package/build/commands/element/getSize.d.ts +0 -6
  162. package/build/commands/element/getSize.d.ts.map +0 -1
  163. package/build/commands/element/getSize.js +0 -47
  164. package/build/commands/element/getTagName.d.ts +0 -25
  165. package/build/commands/element/getTagName.d.ts.map +0 -1
  166. package/build/commands/element/getTagName.js +0 -29
  167. package/build/commands/element/getText.d.ts +0 -42
  168. package/build/commands/element/getText.d.ts.map +0 -1
  169. package/build/commands/element/getText.js +0 -46
  170. package/build/commands/element/getValue.d.ts +0 -25
  171. package/build/commands/element/getValue.d.ts.map +0 -1
  172. package/build/commands/element/getValue.js +0 -33
  173. package/build/commands/element/isClickable.d.ts +0 -40
  174. package/build/commands/element/isClickable.d.ts.map +0 -1
  175. package/build/commands/element/isClickable.js +0 -57
  176. package/build/commands/element/isDisplayed.d.ts +0 -50
  177. package/build/commands/element/isDisplayed.d.ts.map +0 -1
  178. package/build/commands/element/isDisplayed.js +0 -85
  179. package/build/commands/element/isDisplayedInViewport.d.ts +0 -38
  180. package/build/commands/element/isDisplayedInViewport.d.ts.map +0 -1
  181. package/build/commands/element/isDisplayedInViewport.js +0 -55
  182. package/build/commands/element/isEnabled.d.ts +0 -34
  183. package/build/commands/element/isEnabled.d.ts.map +0 -1
  184. package/build/commands/element/isEnabled.js +0 -38
  185. package/build/commands/element/isEqual.d.ts +0 -24
  186. package/build/commands/element/isEqual.d.ts.map +0 -1
  187. package/build/commands/element/isEqual.js +0 -52
  188. package/build/commands/element/isExisting.d.ts +0 -49
  189. package/build/commands/element/isExisting.d.ts.map +0 -1
  190. package/build/commands/element/isExisting.js +0 -65
  191. package/build/commands/element/isFocused.d.ts +0 -28
  192. package/build/commands/element/isFocused.d.ts.map +0 -1
  193. package/build/commands/element/isFocused.js +0 -42
  194. package/build/commands/element/isSelected.d.ts +0 -31
  195. package/build/commands/element/isSelected.d.ts.map +0 -1
  196. package/build/commands/element/isSelected.js +0 -35
  197. package/build/commands/element/moveTo.d.ts +0 -21
  198. package/build/commands/element/moveTo.d.ts.map +0 -1
  199. package/build/commands/element/moveTo.js +0 -39
  200. package/build/commands/element/nextElement.d.ts +0 -25
  201. package/build/commands/element/nextElement.d.ts.map +0 -1
  202. package/build/commands/element/nextElement.js +0 -31
  203. package/build/commands/element/parentElement.d.ts +0 -25
  204. package/build/commands/element/parentElement.d.ts.map +0 -1
  205. package/build/commands/element/parentElement.js +0 -31
  206. package/build/commands/element/previousElement.d.ts +0 -25
  207. package/build/commands/element/previousElement.d.ts.map +0 -1
  208. package/build/commands/element/previousElement.js +0 -31
  209. package/build/commands/element/react$$.d.ts +0 -36
  210. package/build/commands/element/react$$.d.ts.map +0 -1
  211. package/build/commands/element/react$$.js +0 -51
  212. package/build/commands/element/react$.d.ts +0 -46
  213. package/build/commands/element/react$.d.ts.map +0 -1
  214. package/build/commands/element/react$.js +0 -59
  215. package/build/commands/element/saveScreenshot.d.ts +0 -21
  216. package/build/commands/element/saveScreenshot.d.ts.map +0 -1
  217. package/build/commands/element/saveScreenshot.js +0 -40
  218. package/build/commands/element/scrollIntoView.d.ts +0 -21
  219. package/build/commands/element/scrollIntoView.d.ts.map +0 -1
  220. package/build/commands/element/scrollIntoView.js +0 -31
  221. package/build/commands/element/selectByAttribute.d.ts +0 -37
  222. package/build/commands/element/selectByAttribute.d.ts.map +0 -1
  223. package/build/commands/element/selectByAttribute.js +0 -59
  224. package/build/commands/element/selectByIndex.d.ts +0 -31
  225. package/build/commands/element/selectByIndex.d.ts.map +0 -1
  226. package/build/commands/element/selectByIndex.js +0 -55
  227. package/build/commands/element/selectByVisibleText.d.ts +0 -31
  228. package/build/commands/element/selectByVisibleText.d.ts.map +0 -1
  229. package/build/commands/element/selectByVisibleText.js +0 -66
  230. package/build/commands/element/setValue.d.ts +0 -29
  231. package/build/commands/element/setValue.d.ts.map +0 -1
  232. package/build/commands/element/setValue.js +0 -33
  233. package/build/commands/element/shadow$$.d.ts +0 -22
  234. package/build/commands/element/shadow$$.d.ts.map +0 -1
  235. package/build/commands/element/shadow$$.js +0 -27
  236. package/build/commands/element/shadow$.d.ts +0 -22
  237. package/build/commands/element/shadow$.d.ts.map +0 -1
  238. package/build/commands/element/shadow$.js +0 -27
  239. package/build/commands/element/touchAction.d.ts +0 -54
  240. package/build/commands/element/touchAction.d.ts.map +0 -1
  241. package/build/commands/element/touchAction.js +0 -58
  242. package/build/commands/element/waitForClickable.d.ts +0 -34
  243. package/build/commands/element/waitForClickable.d.ts.map +0 -1
  244. package/build/commands/element/waitForClickable.js +0 -37
  245. package/build/commands/element/waitForDisplayed.d.ts +0 -44
  246. package/build/commands/element/waitForDisplayed.d.ts.map +0 -1
  247. package/build/commands/element/waitForDisplayed.js +0 -47
  248. package/build/commands/element/waitForEnabled.d.ts +0 -46
  249. package/build/commands/element/waitForEnabled.d.ts.map +0 -1
  250. package/build/commands/element/waitForEnabled.js +0 -55
  251. package/build/commands/element/waitForExist.d.ts +0 -46
  252. package/build/commands/element/waitForExist.d.ts.map +0 -1
  253. package/build/commands/element/waitForExist.js +0 -49
  254. package/build/commands/element/waitUntil.d.ts +0 -49
  255. package/build/commands/element/waitUntil.d.ts.map +0 -1
  256. package/build/commands/element/waitUntil.js +0 -53
  257. package/build/commands/element.d.ts +0 -100
  258. package/build/commands/element.d.ts.map +0 -1
  259. package/build/commands/element.js +0 -63
  260. package/build/commands/mock/abort.d.ts +0 -19
  261. package/build/commands/mock/abort.d.ts.map +0 -1
  262. package/build/commands/mock/abort.js +0 -20
  263. package/build/commands/mock/abortOnce.d.ts +0 -27
  264. package/build/commands/mock/abortOnce.d.ts.map +0 -1
  265. package/build/commands/mock/abortOnce.js +0 -28
  266. package/build/commands/mock/clear.d.ts +0 -18
  267. package/build/commands/mock/clear.d.ts.map +0 -1
  268. package/build/commands/mock/clear.js +0 -19
  269. package/build/commands/mock/respond.d.ts +0 -54
  270. package/build/commands/mock/respond.d.ts.map +0 -1
  271. package/build/commands/mock/respond.js +0 -55
  272. package/build/commands/mock/respondOnce.d.ts +0 -55
  273. package/build/commands/mock/respondOnce.d.ts.map +0 -1
  274. package/build/commands/mock/respondOnce.js +0 -56
  275. package/build/commands/mock/restore.d.ts +0 -18
  276. package/build/commands/mock/restore.d.ts.map +0 -1
  277. package/build/commands/mock/restore.js +0 -19
  278. package/build/constants.d.ts +0 -14
  279. package/build/constants.d.ts.map +0 -1
  280. package/build/constants.js +0 -286
  281. package/build/index.d.ts +0 -45
  282. package/build/index.d.ts.map +0 -1
  283. package/build/index.js +0 -171
  284. package/build/middlewares.d.ts +0 -12
  285. package/build/middlewares.d.ts.map +0 -1
  286. package/build/middlewares.js +0 -65
  287. package/build/multiremote.d.ts +0 -71
  288. package/build/multiremote.d.ts.map +0 -1
  289. package/build/multiremote.js +0 -160
  290. package/build/protocol-stub.d.ts +0 -16
  291. package/build/protocol-stub.d.ts.map +0 -1
  292. package/build/protocol-stub.js +0 -77
  293. package/build/scripts/getHTML.d.ts +0 -9
  294. package/build/scripts/getHTML.d.ts.map +0 -1
  295. package/build/scripts/getHTML.js +0 -13
  296. package/build/scripts/getProperty.d.ts +0 -43
  297. package/build/scripts/getProperty.d.ts.map +0 -1
  298. package/build/scripts/getProperty.js +0 -12
  299. package/build/scripts/isElementClickable.d.ts +0 -7
  300. package/build/scripts/isElementClickable.d.ts.map +0 -1
  301. package/build/scripts/isElementClickable.js +0 -121
  302. package/build/scripts/isElementDisplayed.d.ts +0 -7
  303. package/build/scripts/isElementDisplayed.d.ts.map +0 -1
  304. package/build/scripts/isElementDisplayed.js +0 -216
  305. package/build/scripts/isElementInViewport.d.ts +0 -10
  306. package/build/scripts/isElementInViewport.d.ts.map +0 -1
  307. package/build/scripts/isElementInViewport.js +0 -22
  308. package/build/scripts/isFocused.d.ts +0 -7
  309. package/build/scripts/isFocused.d.ts.map +0 -1
  310. package/build/scripts/isFocused.js +0 -11
  311. package/build/scripts/newWindow.d.ts +0 -10
  312. package/build/scripts/newWindow.d.ts.map +0 -1
  313. package/build/scripts/newWindow.js +0 -14
  314. package/build/scripts/resq.d.ts +0 -6
  315. package/build/scripts/resq.d.ts.map +0 -1
  316. package/build/scripts/resq.js +0 -58
  317. package/build/scripts/shadowFnFactory.d.ts +0 -2
  318. package/build/scripts/shadowFnFactory.d.ts.map +0 -1
  319. package/build/scripts/shadowFnFactory.js +0 -17
  320. package/build/types.d.ts +0 -402
  321. package/build/types.d.ts.map +0 -1
  322. package/build/types.js +0 -2
  323. package/build/utils/SevereServiceError.d.ts +0 -7
  324. package/build/utils/SevereServiceError.d.ts.map +0 -1
  325. package/build/utils/SevereServiceError.js +0 -12
  326. package/build/utils/Timer.d.ts +0 -33
  327. package/build/utils/Timer.d.ts.map +0 -1
  328. package/build/utils/Timer.js +0 -126
  329. package/build/utils/detectBackend.d.ts +0 -23
  330. package/build/utils/detectBackend.d.ts.map +0 -1
  331. package/build/utils/detectBackend.js +0 -119
  332. package/build/utils/findStrategy.d.ts +0 -10
  333. package/build/utils/findStrategy.d.ts.map +0 -1
  334. package/build/utils/findStrategy.js +0 -267
  335. package/build/utils/getElementObject.d.ts +0 -17
  336. package/build/utils/getElementObject.d.ts.map +0 -1
  337. package/build/utils/getElementObject.js +0 -107
  338. package/build/utils/implicitWait.d.ts +0 -7
  339. package/build/utils/implicitWait.d.ts.map +0 -1
  340. package/build/utils/implicitWait.js +0 -39
  341. package/build/utils/index.d.ts +0 -102
  342. package/build/utils/index.d.ts.map +0 -1
  343. package/build/utils/index.js +0 -543
  344. package/build/utils/interception/devtools.d.ts +0 -61
  345. package/build/utils/interception/devtools.d.ts.map +0 -1
  346. package/build/utils/interception/devtools.js +0 -247
  347. package/build/utils/interception/index.d.ts +0 -26
  348. package/build/utils/interception/index.d.ts.map +0 -1
  349. package/build/utils/interception/index.js +0 -49
  350. package/build/utils/interception/types.d.ts +0 -94
  351. package/build/utils/interception/types.d.ts.map +0 -1
  352. package/build/utils/interception/types.js +0 -2
  353. package/build/utils/interception/webdriver.d.ts +0 -48
  354. package/build/utils/interception/webdriver.d.ts.map +0 -1
  355. package/build/utils/interception/webdriver.js +0 -75
  356. package/build/utils/refetchElement.d.ts +0 -6
  357. package/build/utils/refetchElement.d.ts.map +0 -1
  358. package/build/utils/refetchElement.js +0 -32
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const logger_1 = __importDefault(require("@wdio/logger"));
7
- const mock_1 = require("./mock");
8
- const log = (0, logger_1.default)('webdriverio:mockRestoreAll');
9
- /**
10
- * Restores all mock information and behavior stored in all registered
11
- * mocks of the session.
12
- *
13
- * <example>
14
- :mockRestoreAll.js
15
- it('should restore all mocks', async () => {
16
- const googleMock = await browser.mock('https://google.com/')
17
- googleMock.respond('https://webdriver.io')
18
- const wdioMock = await browser.mock('https://webdriver.io')
19
- wdioMock.respond('http://json.org')
20
-
21
- await browser.url('https://google.com/')
22
- console.log(await browser.getTitle()) // JSON
23
-
24
- await browser.mockRestoreAll()
25
-
26
- await browser.url('https://google.com/')
27
- console.log(await browser.getTitle()) // Google
28
- })
29
- * </example>
30
- *
31
- * @alias browser.mockRestoreAll
32
- */
33
- async function mockRestoreAll() {
34
- for (const [handle, mocks] of Object.entries(mock_1.SESSION_MOCKS)) {
35
- log.trace(`Clearing mocks for ${handle}`);
36
- for (const mock of mocks) {
37
- mock.restore();
38
- }
39
- }
40
- }
41
- exports.default = mockRestoreAll;
@@ -1,41 +0,0 @@
1
- import type { NewWindowOptions } from '../../types';
2
- /**
3
- *
4
- * Open new window in browser. This command is the equivalent function to `window.open()`. This command does not
5
- * work in mobile environments.
6
- *
7
- * __Note:__ When calling this command you automatically switch to the new window.
8
- *
9
- * <example>
10
- :newWindowSync.js
11
- it('should open a new tab', async () => {
12
- await browser.url('https://google.com')
13
- console.log(await browser.getTitle()) // outputs: "Google"
14
-
15
- await browser.newWindow('https://webdriver.io', {
16
- windowName: 'WebdriverIO window',
17
- windowFeature: 'width=420,height=230,resizable,scrollbars=yes,status=1',
18
- })
19
- console.log(await browser.getTitle()) // outputs: "WebdriverIO · Next-gen browser and mobile automation test framework for Node.js"
20
-
21
- const handles = await browser.getWindowHandles()
22
- await browser.switchToWindow(handles[1])
23
- await browser.closeWindow()
24
- await browser.switchToWindow(handles[0])
25
- console.log(await browser.getTitle()) // outputs: "Google"
26
- });
27
- * </example>
28
- *
29
- * @param {String} url website URL to open
30
- * @param {NewWindowOptions=} options newWindow command options
31
- * @param {String=} options.windowName name of the new window
32
- * @param {String=} options.windowFeatures features of opened window (e.g. size, position, scrollbars, etc.)
33
- *
34
- * @return {String} id of window handle of new tab
35
- *
36
- * @uses browser/execute, protocol/getWindowHandles, protocol/switchToWindow
37
- * @alias browser.newWindow
38
- * @type window
39
- */
40
- export default function newWindow(this: WebdriverIO.Browser, url: string, { windowName, windowFeatures }?: NewWindowOptions): Promise<string>;
41
- //# sourceMappingURL=newWindow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"newWindow.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/newWindow.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAInD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAA8B,SAAS,CACnC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,GAAG,EAAE,MAAM,EACX,EAAE,UAAe,EAAE,cAAmB,EAAE,GAAE,gBAAqB,mBAyClE"}
@@ -1,83 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const utils_1 = require("@wdio/utils");
7
- const newWindow_1 = __importDefault(require("../../scripts/newWindow"));
8
- const WAIT_FOR_NEW_HANDLE_TIMEOUT = 3000;
9
- /**
10
- *
11
- * Open new window in browser. This command is the equivalent function to `window.open()`. This command does not
12
- * work in mobile environments.
13
- *
14
- * __Note:__ When calling this command you automatically switch to the new window.
15
- *
16
- * <example>
17
- :newWindowSync.js
18
- it('should open a new tab', async () => {
19
- await browser.url('https://google.com')
20
- console.log(await browser.getTitle()) // outputs: "Google"
21
-
22
- await browser.newWindow('https://webdriver.io', {
23
- windowName: 'WebdriverIO window',
24
- windowFeature: 'width=420,height=230,resizable,scrollbars=yes,status=1',
25
- })
26
- console.log(await browser.getTitle()) // outputs: "WebdriverIO · Next-gen browser and mobile automation test framework for Node.js"
27
-
28
- const handles = await browser.getWindowHandles()
29
- await browser.switchToWindow(handles[1])
30
- await browser.closeWindow()
31
- await browser.switchToWindow(handles[0])
32
- console.log(await browser.getTitle()) // outputs: "Google"
33
- });
34
- * </example>
35
- *
36
- * @param {String} url website URL to open
37
- * @param {NewWindowOptions=} options newWindow command options
38
- * @param {String=} options.windowName name of the new window
39
- * @param {String=} options.windowFeatures features of opened window (e.g. size, position, scrollbars, etc.)
40
- *
41
- * @return {String} id of window handle of new tab
42
- *
43
- * @uses browser/execute, protocol/getWindowHandles, protocol/switchToWindow
44
- * @alias browser.newWindow
45
- * @type window
46
- */
47
- async function newWindow(url, { windowName = '', windowFeatures = '' } = {}) {
48
- /**
49
- * parameter check
50
- */
51
- if (typeof url !== 'string') {
52
- throw new Error('number or type of arguments don\'t agree with newWindow command');
53
- }
54
- /**
55
- * mobile check
56
- */
57
- if (this.isMobile) {
58
- throw new Error('newWindow command is not supported on mobile platforms');
59
- }
60
- const tabsBefore = await this.getWindowHandles();
61
- await this.execute(newWindow_1.default, url, windowName, windowFeatures);
62
- /**
63
- * if tests are run in DevTools there might be a delay until
64
- * a new window handle got registered, this little procedure
65
- * waits for it to exist and avoid race conditions
66
- */
67
- let tabsAfter = await this.getWindowHandles();
68
- const now = Date.now();
69
- while ((Date.now() - now) < WAIT_FOR_NEW_HANDLE_TIMEOUT) {
70
- tabsAfter = await this.getWindowHandles();
71
- if (tabsAfter.length > tabsBefore.length) {
72
- break;
73
- }
74
- await (0, utils_1.sleep)(100);
75
- }
76
- const newTab = tabsAfter.pop();
77
- if (!newTab) {
78
- throw new Error('No window handle was found to switch to');
79
- }
80
- await this.switchToWindow(newTab);
81
- return newTab;
82
- }
83
- exports.default = newWindow;
@@ -1,32 +0,0 @@
1
- /**
2
- * The browser method `overwriteCommand` helps you to overwrite the browser's and element's native commands like `pause` and `click`.
3
- *
4
- * :::info
5
- *
6
- * You can view more information on this in the [custom command](/docs/customcommands#overwriting-native-commands) section.
7
- *
8
- * :::
9
- *
10
- * <example>
11
- :execute.js
12
- // print milliseconds before pause and return its value.
13
- await browser.overwriteCommand('pause', function (origPauseFunction, ms) {
14
- console.log(`Sleeping for ${ms}`)
15
- origPauseFunction(ms)
16
- return ms
17
- })
18
-
19
- // usage
20
- it('should use my overwrite command', async () => {
21
- await browser.url('https://webdriver.io')
22
- await browser.pause(1000) // outputs "Sleeping for 1000"
23
- })
24
- * </example>
25
- * @alias browser.overwriteCommand
26
- * @param {String} name name of the original command
27
- * @param {Function} callback pass original function
28
- * @param {Boolean=} elementScope extend the Element object instead of the Browser object
29
- * @type utility
30
- *
31
- */
32
- //# sourceMappingURL=overwriteCommand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"overwriteCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/overwriteCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG"}
@@ -1,32 +0,0 @@
1
- "use strict";
2
- /**
3
- * The browser method `overwriteCommand` helps you to overwrite the browser's and element's native commands like `pause` and `click`.
4
- *
5
- * :::info
6
- *
7
- * You can view more information on this in the [custom command](/docs/customcommands#overwriting-native-commands) section.
8
- *
9
- * :::
10
- *
11
- * <example>
12
- :execute.js
13
- // print milliseconds before pause and return its value.
14
- await browser.overwriteCommand('pause', function (origPauseFunction, ms) {
15
- console.log(`Sleeping for ${ms}`)
16
- origPauseFunction(ms)
17
- return ms
18
- })
19
-
20
- // usage
21
- it('should use my overwrite command', async () => {
22
- await browser.url('https://webdriver.io')
23
- await browser.pause(1000) // outputs "Sleeping for 1000"
24
- })
25
- * </example>
26
- * @alias browser.overwriteCommand
27
- * @param {String} name name of the original command
28
- * @param {Function} callback pass original function
29
- * @param {Boolean=} elementScope extend the Element object instead of the Browser object
30
- * @type utility
31
- *
32
- */
@@ -1,23 +0,0 @@
1
- /**
2
- *
3
- * Pauses execution for a specific amount of time. It is recommended to not use this command to wait for an
4
- * element to show up. In order to avoid flaky test results it is better to use commands like
5
- * [`waitForExist`](/docs/api/element/waitForExist) or other waitFor* commands.
6
- *
7
- * <example>
8
- :pause.js
9
- it('should pause the execution', async () => {
10
- const starttime = new Date().getTime()
11
- await browser.pause(3000)
12
- const endtime = new Date().getTime()
13
- console.log(endtime - starttime) // outputs: 3000
14
- });
15
- * </example>
16
- *
17
- * @alias browser.pause
18
- * @param {Number} milliseconds time in ms
19
- * @type utility
20
- *
21
- */
22
- export default function pause(this: WebdriverIO.Browser, milliseconds?: number): Promise<unknown>;
23
- //# sourceMappingURL=pause.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pause.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/pause.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,KAAK,CACzB,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,YAAY,SAAO,oBAGtB"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- /**
4
- *
5
- * Pauses execution for a specific amount of time. It is recommended to not use this command to wait for an
6
- * element to show up. In order to avoid flaky test results it is better to use commands like
7
- * [`waitForExist`](/docs/api/element/waitForExist) or other waitFor* commands.
8
- *
9
- * <example>
10
- :pause.js
11
- it('should pause the execution', async () => {
12
- const starttime = new Date().getTime()
13
- await browser.pause(3000)
14
- const endtime = new Date().getTime()
15
- console.log(endtime - starttime) // outputs: 3000
16
- });
17
- * </example>
18
- *
19
- * @alias browser.pause
20
- * @param {Number} milliseconds time in ms
21
- * @type utility
22
- *
23
- */
24
- function pause(milliseconds = 1000) {
25
- return new Promise((resolve) => setTimeout(resolve, milliseconds));
26
- }
27
- exports.default = pause;
@@ -1,36 +0,0 @@
1
- import type { ReactSelectorOptions, ElementArray } from '../../types';
2
- /**
3
- *
4
- * The `react$$` command is a useful command to query multiple React Components
5
- * by their actual name and filter them by props and state.
6
- *
7
- * :::info
8
- *
9
- * The command only works with applications using React v16.x. Read more about React
10
- * selectors in the [Selectors](/docs/selectors#react-selectors) guide.
11
- *
12
- * :::
13
- *
14
- * <example>
15
- :pause.js
16
- it('should calculate 7 * 6', async () => {
17
- await browser.url('https://ahfarmer.github.io/calculator/');
18
-
19
- const orangeButtons = await browser.react$$('t', {
20
- props: { orange: true }
21
- })
22
- console.log(await orangeButtons.map((btn) => btn.getText()));
23
- // prints "[ '÷', 'x', '-', '+', '=' ]"
24
- });
25
- * </example>
26
- *
27
- * @alias browser.react$$
28
- * @param {String} selector of React component
29
- * @param {ReactSelectorOptions=} options React selector options
30
- * @param {Object=} options.props React props the element should contain
31
- * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
32
- * @return {ElementArray}
33
- *
34
- */
35
- export default function react$$(this: WebdriverIO.Browser, selector: string, { props, state }?: ReactSelectorOptions): Promise<ElementArray>;
36
- //# sourceMappingURL=react$$.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react$$.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/react$$.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAIrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAA8B,OAAO,CACjC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,EAChB,EAAE,KAAU,EAAE,KAAU,EAAE,GAAE,oBAAyB,yBAUxD"}
@@ -1,51 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- const utils_1 = require("../../utils");
8
- const getElementObject_1 = require("../../utils/getElementObject");
9
- const resq_1 = require("../../scripts/resq");
10
- const resqScript = fs_1.default.readFileSync(require.resolve('resq'));
11
- /**
12
- *
13
- * The `react$$` command is a useful command to query multiple React Components
14
- * by their actual name and filter them by props and state.
15
- *
16
- * :::info
17
- *
18
- * The command only works with applications using React v16.x. Read more about React
19
- * selectors in the [Selectors](/docs/selectors#react-selectors) guide.
20
- *
21
- * :::
22
- *
23
- * <example>
24
- :pause.js
25
- it('should calculate 7 * 6', async () => {
26
- await browser.url('https://ahfarmer.github.io/calculator/');
27
-
28
- const orangeButtons = await browser.react$$('t', {
29
- props: { orange: true }
30
- })
31
- console.log(await orangeButtons.map((btn) => btn.getText()));
32
- // prints "[ '÷', 'x', '-', '+', '=' ]"
33
- });
34
- * </example>
35
- *
36
- * @alias browser.react$$
37
- * @param {String} selector of React component
38
- * @param {ReactSelectorOptions=} options React selector options
39
- * @param {Object=} options.props React props the element should contain
40
- * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
41
- * @return {ElementArray}
42
- *
43
- */
44
- async function react$$(selector, { props = {}, state = {} } = {}) {
45
- await this.executeScript(resqScript.toString(), []);
46
- await this.execute(resq_1.waitToLoadReact);
47
- const res = await this.execute(resq_1.react$$, selector, props, state);
48
- const elements = await getElementObject_1.getElements.call(this, selector, res, true);
49
- return (0, utils_1.enhanceElementsArray)(elements, this, selector, 'react$$', [props, state]);
50
- }
51
- exports.default = react$$;
@@ -1,46 +0,0 @@
1
- import type { ReactSelectorOptions } from '../../types';
2
- /**
3
- *
4
- * The `react$` command is a useful command to query React Components by their
5
- * actual name and filter them by props and state.
6
- *
7
- * :::info
8
- *
9
- * The command only works with applications using React v16.x. Read more about React
10
- * selectors in the [Selectors](/docs/selectors#react-selectors) guide.
11
- *
12
- * :::
13
- *
14
- * <example>
15
- :pause.js
16
- it('should calculate 7 * 6', async () => {
17
- await browser.url('https://ahfarmer.github.io/calculator/');
18
- const appWrapper = await $('div#root')
19
-
20
- await browser.react$('t', {
21
- props: { name: '7' }
22
- }).click()
23
- await browser.react$('t', {
24
- props: { name: 'x' }
25
- }).click()
26
- await browser.react$('t', {
27
- props: { name: '6' }
28
- }).click()
29
- await browser.react$('t', {
30
- props: { name: '=' }
31
- }).click()
32
-
33
- console.log(await $('.component-display').getText()); // prints "42"
34
- });
35
- * </example>
36
- *
37
- * @alias browser.react$
38
- * @param {String} selector of React component
39
- * @param {ReactSelectorOptions=} options React selector options
40
- * @param {Object=} options.props React props the element should contain
41
- * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
42
- * @return {Element}
43
- *
44
- */
45
- export default function react$(this: WebdriverIO.Browser, selector: string, { props, state }?: ReactSelectorOptions): Promise<WebdriverIO.Element>;
46
- //# sourceMappingURL=react$.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react$.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/react$.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAIvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAA8B,MAAM,CAChC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,EAChB,EAAE,KAAU,EAAE,KAAU,EAAE,GAAE,oBAAyB,gCASxD"}
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const fs_1 = __importDefault(require("fs"));
7
- const getElementObject_1 = require("../../utils/getElementObject");
8
- const resq_1 = require("../../scripts/resq");
9
- const resqScript = fs_1.default.readFileSync(require.resolve('resq'));
10
- /**
11
- *
12
- * The `react$` command is a useful command to query React Components by their
13
- * actual name and filter them by props and state.
14
- *
15
- * :::info
16
- *
17
- * The command only works with applications using React v16.x. Read more about React
18
- * selectors in the [Selectors](/docs/selectors#react-selectors) guide.
19
- *
20
- * :::
21
- *
22
- * <example>
23
- :pause.js
24
- it('should calculate 7 * 6', async () => {
25
- await browser.url('https://ahfarmer.github.io/calculator/');
26
- const appWrapper = await $('div#root')
27
-
28
- await browser.react$('t', {
29
- props: { name: '7' }
30
- }).click()
31
- await browser.react$('t', {
32
- props: { name: 'x' }
33
- }).click()
34
- await browser.react$('t', {
35
- props: { name: '6' }
36
- }).click()
37
- await browser.react$('t', {
38
- props: { name: '=' }
39
- }).click()
40
-
41
- console.log(await $('.component-display').getText()); // prints "42"
42
- });
43
- * </example>
44
- *
45
- * @alias browser.react$
46
- * @param {String} selector of React component
47
- * @param {ReactSelectorOptions=} options React selector options
48
- * @param {Object=} options.props React props the element should contain
49
- * @param {Array<any>|number|string|object|boolean=} options.state React state the element should be in
50
- * @return {Element}
51
- *
52
- */
53
- async function react$(selector, { props = {}, state = {} } = {}) {
54
- await this.executeScript(resqScript.toString(), []);
55
- await this.execute(resq_1.waitToLoadReact);
56
- const res = await this.execute(resq_1.react$, selector, props, state);
57
- return getElementObject_1.getElement.call(this, selector, res, true);
58
- }
59
- exports.default = react$;
@@ -1,23 +0,0 @@
1
- /**
2
- *
3
- * Creates a new Selenium session with your current capabilities. This is useful if you
4
- * test highly stateful application where you need to clean the browser session between
5
- * the tests in your spec file to avoid creating hundreds of single test files with WDIO.
6
- * Be careful though, this command affects your test time tremendously since spawning
7
- * new Selenium sessions is very time consuming especially when using cloud services.
8
- *
9
- * <example>
10
- :reloadSync.js
11
- it('should reload my session with current capabilities', async () => {
12
- console.log(browser.sessionId) // outputs: e042b3f3cd5a479da4e171825e96e655
13
- await browser.reloadSession()
14
- console.log(browser.sessionId) // outputs: 9a0d9bf9d4864160aa982c50cf18a573
15
- })
16
- * </example>
17
- *
18
- * @alias browser.reloadSession
19
- * @type utility
20
- *
21
- */
22
- export default function reloadSession(this: WebdriverIO.Browser): Promise<string>;
23
- //# sourceMappingURL=reloadSession.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reloadSession.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/reloadSession.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAA8B,aAAa,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,mBA+BrE"}
@@ -1,58 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const logger_1 = __importDefault(require("@wdio/logger"));
7
- const log = (0, logger_1.default)('webdriverio');
8
- /**
9
- *
10
- * Creates a new Selenium session with your current capabilities. This is useful if you
11
- * test highly stateful application where you need to clean the browser session between
12
- * the tests in your spec file to avoid creating hundreds of single test files with WDIO.
13
- * Be careful though, this command affects your test time tremendously since spawning
14
- * new Selenium sessions is very time consuming especially when using cloud services.
15
- *
16
- * <example>
17
- :reloadSync.js
18
- it('should reload my session with current capabilities', async () => {
19
- console.log(browser.sessionId) // outputs: e042b3f3cd5a479da4e171825e96e655
20
- await browser.reloadSession()
21
- console.log(browser.sessionId) // outputs: 9a0d9bf9d4864160aa982c50cf18a573
22
- })
23
- * </example>
24
- *
25
- * @alias browser.reloadSession
26
- * @type utility
27
- *
28
- */
29
- async function reloadSession() {
30
- var _a;
31
- const oldSessionId = this.sessionId;
32
- /**
33
- * end current running session, if session already gone suppress exceptions
34
- */
35
- try {
36
- await this.deleteSession();
37
- }
38
- catch (err) {
39
- /**
40
- * ignoring all exceptions that could be caused by browser.deleteSession()
41
- * there maybe times where session is ended remotely, browser.deleteSession() will fail in this case)
42
- * this can be worked around in code but requires a lot of overhead
43
- */
44
- log.warn(`Suppressing error closing the session: ${err.stack}`);
45
- }
46
- if ((_a = this.puppeteer) === null || _a === void 0 ? void 0 : _a.isConnected()) {
47
- this.puppeteer.disconnect();
48
- log.debug('Disconnected puppeteer session');
49
- }
50
- const ProtocolDriver = require(this.options.automationProtocol).default;
51
- await ProtocolDriver.reloadSession(this);
52
- const options = this.options;
53
- if (Array.isArray(options.onReload) && options.onReload.length) {
54
- await Promise.all(options.onReload.map((hook) => hook(oldSessionId, this.sessionId)));
55
- }
56
- return this.sessionId;
57
- }
58
- exports.default = reloadSession;
@@ -1,46 +0,0 @@
1
- /// <reference types="node" />
2
- declare type PDFPrintOptions = {
3
- orientation?: string;
4
- scale?: number;
5
- background?: boolean;
6
- width?: number;
7
- height?: number;
8
- top?: number;
9
- bottom?: number;
10
- left?: number;
11
- right?: number;
12
- shrinkToFit?: boolean;
13
- pageRanges?: object[];
14
- };
15
- /**
16
- *
17
- * Prints the page of the current browsing context to a PDF file on your OS.
18
- *
19
- * <example>
20
- :savePDF.js
21
- it('should save a PDF screenshot of the browser view', function () {
22
- await browser.savePDF('./some/path/screenshot.pdf');
23
- });
24
- * </example>
25
- *
26
- * @alias browser.savePDF
27
- * @param {String} filepath path to the generated pdf (`.pdf` suffix is required) relative to the execution directory
28
- * @param {PDFPrintOptions=} options Print PDF Options
29
- * @param {String=} options.orientation Orientation of PDF page
30
- * @param {number=} options.scale Scale of PDF page
31
- * @param {boolean=} options.background Include background of PDF page
32
- * @param {number=} options.width Width of PDF page
33
- * @param {number=} options.height Height of PDF page
34
- * @param {number=} options.top Top padding of PDF page
35
- * @param {number=} options.bottom Bottom padding of PDF page
36
- * @param {number=} options.left Left padding of PDF page
37
- * @param {number=} options.right Right padding of PDF page
38
- * @param {boolean=} options.shrinkToFit Shrink page to fit page
39
- * @param {object[]=} options.pageRanges Range of pages to include in PDF
40
- * @return {Buffer} screenshot buffer
41
- * @type utility
42
- *
43
- */
44
- export default function savePDF(this: WebdriverIO.Browser, filepath: string, options?: PDFPrintOptions): Promise<Buffer>;
45
- export {};
46
- //# sourceMappingURL=savePDF.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"savePDF.d.ts","sourceRoot":"","sources":["../../../src/commands/browser/savePDF.ts"],"names":[],"mappings":";AAGA,aAAK,eAAe,GAAG;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAA8B,OAAO,CACjC,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,eAAe,mBAmB5B"}