webdriverio 7.17.0 → 7.18.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/build/commands/browser/$$.d.ts +50 -0
  2. package/build/commands/browser/$$.d.ts.map +1 -0
  3. package/build/commands/browser/$$.js +57 -0
  4. package/build/commands/browser/$.d.ts +77 -0
  5. package/build/commands/browser/$.d.ts.map +1 -0
  6. package/build/commands/browser/$.js +91 -0
  7. package/build/commands/browser/addCommand.d.ts +37 -0
  8. package/build/commands/browser/addCommand.d.ts.map +1 -0
  9. package/build/commands/browser/addCommand.js +37 -0
  10. package/build/commands/browser/call.d.ts +42 -0
  11. package/build/commands/browser/call.d.ts.map +1 -0
  12. package/build/commands/browser/call.js +49 -0
  13. package/build/commands/browser/custom$$.d.ts +26 -0
  14. package/build/commands/browser/custom$$.d.ts.map +1 -0
  15. package/build/commands/browser/custom$$.js +47 -0
  16. package/build/commands/browser/custom$.d.ts +25 -0
  17. package/build/commands/browser/custom$.d.ts.map +1 -0
  18. package/build/commands/browser/custom$.js +47 -0
  19. package/build/commands/browser/debug.d.ts +32 -0
  20. package/build/commands/browser/debug.d.ts.map +1 -0
  21. package/build/commands/browser/debug.js +108 -0
  22. package/build/commands/browser/deleteCookies.d.ts +45 -0
  23. package/build/commands/browser/deleteCookies.d.ts.map +1 -0
  24. package/build/commands/browser/deleteCookies.js +56 -0
  25. package/build/commands/browser/execute.d.ts +37 -0
  26. package/build/commands/browser/execute.d.ts.map +1 -0
  27. package/build/commands/browser/execute.js +55 -0
  28. package/build/commands/browser/executeAsync.d.ts +45 -0
  29. package/build/commands/browser/executeAsync.d.ts.map +1 -0
  30. package/build/commands/browser/executeAsync.js +63 -0
  31. package/build/commands/browser/getCookies.d.ts +34 -0
  32. package/build/commands/browser/getCookies.d.ts.map +1 -0
  33. package/build/commands/browser/getCookies.js +46 -0
  34. package/build/commands/browser/getPuppeteer.d.ts +38 -0
  35. package/build/commands/browser/getPuppeteer.d.ts.map +1 -0
  36. package/build/commands/browser/getPuppeteer.js +119 -0
  37. package/build/commands/browser/getWindowSize.d.ts +25 -0
  38. package/build/commands/browser/getWindowSize.d.ts.map +1 -0
  39. package/build/commands/browser/getWindowSize.js +30 -0
  40. package/build/commands/browser/keys.d.ts +28 -0
  41. package/build/commands/browser/keys.d.ts.map +1 -0
  42. package/build/commands/browser/keys.js +64 -0
  43. package/build/commands/browser/mock.d.ts +111 -0
  44. package/build/commands/browser/mock.d.ts.map +1 -0
  45. package/build/commands/browser/mock.js +164 -0
  46. package/build/commands/browser/mockClearAll.d.ts +28 -0
  47. package/build/commands/browser/mockClearAll.d.ts.map +1 -0
  48. package/build/commands/browser/mockClearAll.js +43 -0
  49. package/build/commands/browser/mockRestoreAll.d.ts +26 -0
  50. package/build/commands/browser/mockRestoreAll.d.ts.map +1 -0
  51. package/build/commands/browser/mockRestoreAll.js +41 -0
  52. package/build/commands/browser/newWindow.d.ts +41 -0
  53. package/build/commands/browser/newWindow.d.ts.map +1 -0
  54. package/build/commands/browser/newWindow.js +83 -0
  55. package/build/commands/browser/overwriteCommand.d.ts +32 -0
  56. package/build/commands/browser/overwriteCommand.d.ts.map +1 -0
  57. package/build/commands/browser/overwriteCommand.js +32 -0
  58. package/build/commands/browser/pause.d.ts +23 -0
  59. package/build/commands/browser/pause.d.ts.map +1 -0
  60. package/build/commands/browser/pause.js +27 -0
  61. package/build/commands/browser/react$$.d.ts +36 -0
  62. package/build/commands/browser/react$$.d.ts.map +1 -0
  63. package/build/commands/browser/react$$.js +51 -0
  64. package/build/commands/browser/react$.d.ts +46 -0
  65. package/build/commands/browser/react$.d.ts.map +1 -0
  66. package/build/commands/browser/react$.js +59 -0
  67. package/build/commands/browser/reloadSession.d.ts +23 -0
  68. package/build/commands/browser/reloadSession.d.ts.map +1 -0
  69. package/build/commands/browser/reloadSession.js +58 -0
  70. package/build/commands/browser/savePDF.d.ts +46 -0
  71. package/build/commands/browser/savePDF.d.ts.map +1 -0
  72. package/build/commands/browser/savePDF.js +51 -0
  73. package/build/commands/browser/saveRecordingScreen.d.ts +28 -0
  74. package/build/commands/browser/saveRecordingScreen.d.ts.map +1 -0
  75. package/build/commands/browser/saveRecordingScreen.js +47 -0
  76. package/build/commands/browser/saveScreenshot.d.ts +22 -0
  77. package/build/commands/browser/saveScreenshot.d.ts.map +1 -0
  78. package/build/commands/browser/saveScreenshot.js +41 -0
  79. package/build/commands/browser/setCookies.d.ts +57 -0
  80. package/build/commands/browser/setCookies.d.ts.map +1 -0
  81. package/build/commands/browser/setCookies.js +66 -0
  82. package/build/commands/browser/setTimeout.d.ts +31 -0
  83. package/build/commands/browser/setTimeout.d.ts.map +1 -0
  84. package/build/commands/browser/setTimeout.js +61 -0
  85. package/build/commands/browser/setWindowSize.d.ts +20 -0
  86. package/build/commands/browser/setWindowSize.d.ts.map +1 -0
  87. package/build/commands/browser/setWindowSize.js +43 -0
  88. package/build/commands/browser/switchWindow.d.ts +30 -0
  89. package/build/commands/browser/switchWindow.d.ts.map +1 -0
  90. package/build/commands/browser/switchWindow.js +73 -0
  91. package/build/commands/browser/throttle.d.ts +3 -0
  92. package/build/commands/browser/throttle.d.ts.map +1 -0
  93. package/build/commands/browser/throttle.js +144 -0
  94. package/build/commands/browser/touchAction.d.ts +61 -0
  95. package/build/commands/browser/touchAction.d.ts.map +1 -0
  96. package/build/commands/browser/touchAction.js +65 -0
  97. package/build/commands/browser/uploadFile.d.ts +32 -0
  98. package/build/commands/browser/uploadFile.d.ts.map +1 -0
  99. package/build/commands/browser/uploadFile.js +63 -0
  100. package/build/commands/browser/url.d.ts +38 -0
  101. package/build/commands/browser/url.d.ts.map +1 -0
  102. package/build/commands/browser/url.js +49 -0
  103. package/build/commands/browser/waitUntil.d.ts +44 -0
  104. package/build/commands/browser/waitUntil.d.ts.map +1 -0
  105. package/build/commands/browser/waitUntil.js +73 -0
  106. package/build/commands/browser.d.ts +70 -0
  107. package/build/commands/browser.d.ts.map +1 -0
  108. package/build/commands/browser.js +44 -0
  109. package/build/commands/constant.d.ts +19 -0
  110. package/build/commands/constant.d.ts.map +1 -0
  111. package/build/commands/constant.js +91 -0
  112. package/build/commands/element/$$.d.ts +46 -0
  113. package/build/commands/element/$$.d.ts.map +1 -0
  114. package/build/commands/element/$$.js +50 -0
  115. package/build/commands/element/$.d.ts +72 -0
  116. package/build/commands/element/$.d.ts.map +1 -0
  117. package/build/commands/element/$.js +76 -0
  118. package/build/commands/element/addValue.d.ts +33 -0
  119. package/build/commands/element/addValue.d.ts.map +1 -0
  120. package/build/commands/element/addValue.js +48 -0
  121. package/build/commands/element/clearValue.d.ts +28 -0
  122. package/build/commands/element/clearValue.d.ts.map +1 -0
  123. package/build/commands/element/clearValue.js +32 -0
  124. package/build/commands/element/click.d.ts +73 -0
  125. package/build/commands/element/click.d.ts.map +1 -0
  126. package/build/commands/element/click.js +134 -0
  127. package/build/commands/element/custom$$.d.ts +28 -0
  128. package/build/commands/element/custom$$.d.ts.map +1 -0
  129. package/build/commands/element/custom$$.js +57 -0
  130. package/build/commands/element/custom$.d.ts +27 -0
  131. package/build/commands/element/custom$.d.ts.map +1 -0
  132. package/build/commands/element/custom$.js +57 -0
  133. package/build/commands/element/doubleClick.d.ts +25 -0
  134. package/build/commands/element/doubleClick.d.ts.map +1 -0
  135. package/build/commands/element/doubleClick.js +51 -0
  136. package/build/commands/element/dragAndDrop.d.ts +41 -0
  137. package/build/commands/element/dragAndDrop.d.ts.map +1 -0
  138. package/build/commands/element/dragAndDrop.js +98 -0
  139. package/build/commands/element/getAttribute.d.ts +28 -0
  140. package/build/commands/element/getAttribute.d.ts.map +1 -0
  141. package/build/commands/element/getAttribute.js +32 -0
  142. package/build/commands/element/getCSSProperty.d.ts +71 -0
  143. package/build/commands/element/getCSSProperty.d.ts.map +1 -0
  144. package/build/commands/element/getCSSProperty.js +108 -0
  145. package/build/commands/element/getComputedLabel.d.ts +20 -0
  146. package/build/commands/element/getComputedLabel.d.ts.map +1 -0
  147. package/build/commands/element/getComputedLabel.js +24 -0
  148. package/build/commands/element/getComputedRole.d.ts +20 -0
  149. package/build/commands/element/getComputedRole.d.ts.map +1 -0
  150. package/build/commands/element/getComputedRole.js +24 -0
  151. package/build/commands/element/getHTML.d.ts +32 -0
  152. package/build/commands/element/getHTML.d.ts.map +1 -0
  153. package/build/commands/element/getHTML.js +46 -0
  154. package/build/commands/element/getLocation.d.ts +6 -0
  155. package/build/commands/element/getLocation.d.ts.map +1 -0
  156. package/build/commands/element/getLocation.js +46 -0
  157. package/build/commands/element/getProperty.d.ts +53 -0
  158. package/build/commands/element/getProperty.d.ts.map +1 -0
  159. package/build/commands/element/getProperty.js +31 -0
  160. package/build/commands/element/getSize.d.ts +6 -0
  161. package/build/commands/element/getSize.d.ts.map +1 -0
  162. package/build/commands/element/getSize.js +47 -0
  163. package/build/commands/element/getTagName.d.ts +25 -0
  164. package/build/commands/element/getTagName.d.ts.map +1 -0
  165. package/build/commands/element/getTagName.js +29 -0
  166. package/build/commands/element/getText.d.ts +42 -0
  167. package/build/commands/element/getText.d.ts.map +1 -0
  168. package/build/commands/element/getText.js +46 -0
  169. package/build/commands/element/getValue.d.ts +25 -0
  170. package/build/commands/element/getValue.d.ts.map +1 -0
  171. package/build/commands/element/getValue.js +33 -0
  172. package/build/commands/element/isClickable.d.ts +40 -0
  173. package/build/commands/element/isClickable.d.ts.map +1 -0
  174. package/build/commands/element/isClickable.js +57 -0
  175. package/build/commands/element/isDisplayed.d.ts +50 -0
  176. package/build/commands/element/isDisplayed.d.ts.map +1 -0
  177. package/build/commands/element/isDisplayed.js +85 -0
  178. package/build/commands/element/isDisplayedInViewport.d.ts +38 -0
  179. package/build/commands/element/isDisplayedInViewport.d.ts.map +1 -0
  180. package/build/commands/element/isDisplayedInViewport.js +55 -0
  181. package/build/commands/element/isEnabled.d.ts +34 -0
  182. package/build/commands/element/isEnabled.d.ts.map +1 -0
  183. package/build/commands/element/isEnabled.js +38 -0
  184. package/build/commands/element/isEqual.d.ts +24 -0
  185. package/build/commands/element/isEqual.d.ts.map +1 -0
  186. package/build/commands/element/isEqual.js +52 -0
  187. package/build/commands/element/isExisting.d.ts +49 -0
  188. package/build/commands/element/isExisting.d.ts.map +1 -0
  189. package/build/commands/element/isExisting.js +65 -0
  190. package/build/commands/element/isFocused.d.ts +28 -0
  191. package/build/commands/element/isFocused.d.ts.map +1 -0
  192. package/build/commands/element/isFocused.js +42 -0
  193. package/build/commands/element/isSelected.d.ts +31 -0
  194. package/build/commands/element/isSelected.d.ts.map +1 -0
  195. package/build/commands/element/isSelected.js +35 -0
  196. package/build/commands/element/moveTo.d.ts +21 -0
  197. package/build/commands/element/moveTo.d.ts.map +1 -0
  198. package/build/commands/element/moveTo.js +39 -0
  199. package/build/commands/element/nextElement.d.ts +25 -0
  200. package/build/commands/element/nextElement.d.ts.map +1 -0
  201. package/build/commands/element/nextElement.js +31 -0
  202. package/build/commands/element/parentElement.d.ts +25 -0
  203. package/build/commands/element/parentElement.d.ts.map +1 -0
  204. package/build/commands/element/parentElement.js +31 -0
  205. package/build/commands/element/previousElement.d.ts +25 -0
  206. package/build/commands/element/previousElement.d.ts.map +1 -0
  207. package/build/commands/element/previousElement.js +31 -0
  208. package/build/commands/element/react$$.d.ts +36 -0
  209. package/build/commands/element/react$$.d.ts.map +1 -0
  210. package/build/commands/element/react$$.js +51 -0
  211. package/build/commands/element/react$.d.ts +46 -0
  212. package/build/commands/element/react$.d.ts.map +1 -0
  213. package/build/commands/element/react$.js +59 -0
  214. package/build/commands/element/saveScreenshot.d.ts +21 -0
  215. package/build/commands/element/saveScreenshot.d.ts.map +1 -0
  216. package/build/commands/element/saveScreenshot.js +40 -0
  217. package/build/commands/element/scrollIntoView.d.ts +21 -0
  218. package/build/commands/element/scrollIntoView.d.ts.map +1 -0
  219. package/build/commands/element/scrollIntoView.js +31 -0
  220. package/build/commands/element/selectByAttribute.d.ts +37 -0
  221. package/build/commands/element/selectByAttribute.d.ts.map +1 -0
  222. package/build/commands/element/selectByAttribute.js +59 -0
  223. package/build/commands/element/selectByIndex.d.ts +31 -0
  224. package/build/commands/element/selectByIndex.d.ts.map +1 -0
  225. package/build/commands/element/selectByIndex.js +55 -0
  226. package/build/commands/element/selectByVisibleText.d.ts +31 -0
  227. package/build/commands/element/selectByVisibleText.d.ts.map +1 -0
  228. package/build/commands/element/selectByVisibleText.js +66 -0
  229. package/build/commands/element/setValue.d.ts +29 -0
  230. package/build/commands/element/setValue.d.ts.map +1 -0
  231. package/build/commands/element/setValue.js +33 -0
  232. package/build/commands/element/shadow$$.d.ts +22 -0
  233. package/build/commands/element/shadow$$.d.ts.map +1 -0
  234. package/build/commands/element/shadow$$.js +27 -0
  235. package/build/commands/element/shadow$.d.ts +22 -0
  236. package/build/commands/element/shadow$.d.ts.map +1 -0
  237. package/build/commands/element/shadow$.js +27 -0
  238. package/build/commands/element/touchAction.d.ts +54 -0
  239. package/build/commands/element/touchAction.d.ts.map +1 -0
  240. package/build/commands/element/touchAction.js +58 -0
  241. package/build/commands/element/waitForClickable.d.ts +34 -0
  242. package/build/commands/element/waitForClickable.d.ts.map +1 -0
  243. package/build/commands/element/waitForClickable.js +37 -0
  244. package/build/commands/element/waitForDisplayed.d.ts +44 -0
  245. package/build/commands/element/waitForDisplayed.d.ts.map +1 -0
  246. package/build/commands/element/waitForDisplayed.js +47 -0
  247. package/build/commands/element/waitForEnabled.d.ts +46 -0
  248. package/build/commands/element/waitForEnabled.d.ts.map +1 -0
  249. package/build/commands/element/waitForEnabled.js +55 -0
  250. package/build/commands/element/waitForExist.d.ts +46 -0
  251. package/build/commands/element/waitForExist.d.ts.map +1 -0
  252. package/build/commands/element/waitForExist.js +49 -0
  253. package/build/commands/element/waitUntil.d.ts +49 -0
  254. package/build/commands/element/waitUntil.d.ts.map +1 -0
  255. package/build/commands/element/waitUntil.js +53 -0
  256. package/build/commands/element.d.ts +100 -0
  257. package/build/commands/element.d.ts.map +1 -0
  258. package/build/commands/element.js +63 -0
  259. package/build/commands/mock/abort.d.ts +19 -0
  260. package/build/commands/mock/abort.d.ts.map +1 -0
  261. package/build/commands/mock/abort.js +20 -0
  262. package/build/commands/mock/abortOnce.d.ts +27 -0
  263. package/build/commands/mock/abortOnce.d.ts.map +1 -0
  264. package/build/commands/mock/abortOnce.js +28 -0
  265. package/build/commands/mock/clear.d.ts +18 -0
  266. package/build/commands/mock/clear.d.ts.map +1 -0
  267. package/build/commands/mock/clear.js +19 -0
  268. package/build/commands/mock/respond.d.ts +54 -0
  269. package/build/commands/mock/respond.d.ts.map +1 -0
  270. package/build/commands/mock/respond.js +55 -0
  271. package/build/commands/mock/respondOnce.d.ts +55 -0
  272. package/build/commands/mock/respondOnce.d.ts.map +1 -0
  273. package/build/commands/mock/respondOnce.js +56 -0
  274. package/build/commands/mock/restore.d.ts +18 -0
  275. package/build/commands/mock/restore.d.ts.map +1 -0
  276. package/build/commands/mock/restore.js +19 -0
  277. package/build/constants.d.ts +14 -0
  278. package/build/constants.d.ts.map +1 -0
  279. package/build/constants.js +287 -0
  280. package/build/index.d.ts +45 -0
  281. package/build/index.d.ts.map +1 -0
  282. package/build/index.js +175 -0
  283. package/build/middlewares.d.ts +12 -0
  284. package/build/middlewares.d.ts.map +1 -0
  285. package/build/middlewares.js +65 -0
  286. package/build/multiremote.d.ts +71 -0
  287. package/build/multiremote.d.ts.map +1 -0
  288. package/build/multiremote.js +160 -0
  289. package/build/protocol-stub.d.ts +16 -0
  290. package/build/protocol-stub.d.ts.map +1 -0
  291. package/build/protocol-stub.js +77 -0
  292. package/build/scripts/getHTML.d.ts +9 -0
  293. package/build/scripts/getHTML.d.ts.map +1 -0
  294. package/build/scripts/getHTML.js +13 -0
  295. package/build/scripts/getProperty.d.ts +43 -0
  296. package/build/scripts/getProperty.d.ts.map +1 -0
  297. package/build/scripts/getProperty.js +12 -0
  298. package/build/scripts/isElementClickable.d.ts +7 -0
  299. package/build/scripts/isElementClickable.d.ts.map +1 -0
  300. package/build/scripts/isElementClickable.js +121 -0
  301. package/build/scripts/isElementDisplayed.d.ts +7 -0
  302. package/build/scripts/isElementDisplayed.d.ts.map +1 -0
  303. package/build/scripts/isElementDisplayed.js +216 -0
  304. package/build/scripts/isElementInViewport.d.ts +10 -0
  305. package/build/scripts/isElementInViewport.d.ts.map +1 -0
  306. package/build/scripts/isElementInViewport.js +22 -0
  307. package/build/scripts/isFocused.d.ts +7 -0
  308. package/build/scripts/isFocused.d.ts.map +1 -0
  309. package/build/scripts/isFocused.js +11 -0
  310. package/build/scripts/newWindow.d.ts +10 -0
  311. package/build/scripts/newWindow.d.ts.map +1 -0
  312. package/build/scripts/newWindow.js +14 -0
  313. package/build/scripts/resq.d.ts +6 -0
  314. package/build/scripts/resq.d.ts.map +1 -0
  315. package/build/scripts/resq.js +58 -0
  316. package/build/scripts/shadowFnFactory.d.ts +2 -0
  317. package/build/scripts/shadowFnFactory.d.ts.map +1 -0
  318. package/build/scripts/shadowFnFactory.js +17 -0
  319. package/build/types.d.ts +402 -0
  320. package/build/types.d.ts.map +1 -0
  321. package/build/types.js +2 -0
  322. package/build/utils/SevereServiceError.d.ts +7 -0
  323. package/build/utils/SevereServiceError.d.ts.map +1 -0
  324. package/build/utils/SevereServiceError.js +12 -0
  325. package/build/utils/Timer.d.ts +33 -0
  326. package/build/utils/Timer.d.ts.map +1 -0
  327. package/build/utils/Timer.js +126 -0
  328. package/build/utils/detectBackend.d.ts +23 -0
  329. package/build/utils/detectBackend.d.ts.map +1 -0
  330. package/build/utils/detectBackend.js +119 -0
  331. package/build/utils/findStrategy.d.ts +10 -0
  332. package/build/utils/findStrategy.d.ts.map +1 -0
  333. package/build/utils/findStrategy.js +267 -0
  334. package/build/utils/getElementObject.d.ts +17 -0
  335. package/build/utils/getElementObject.d.ts.map +1 -0
  336. package/build/utils/getElementObject.js +107 -0
  337. package/build/utils/implicitWait.d.ts +7 -0
  338. package/build/utils/implicitWait.d.ts.map +1 -0
  339. package/build/utils/implicitWait.js +39 -0
  340. package/build/utils/index.d.ts +102 -0
  341. package/build/utils/index.d.ts.map +1 -0
  342. package/build/utils/index.js +543 -0
  343. package/build/utils/interception/devtools.d.ts +61 -0
  344. package/build/utils/interception/devtools.d.ts.map +1 -0
  345. package/build/utils/interception/devtools.js +247 -0
  346. package/build/utils/interception/index.d.ts +26 -0
  347. package/build/utils/interception/index.d.ts.map +1 -0
  348. package/build/utils/interception/index.js +49 -0
  349. package/build/utils/interception/types.d.ts +94 -0
  350. package/build/utils/interception/types.d.ts.map +1 -0
  351. package/build/utils/interception/types.js +2 -0
  352. package/build/utils/interception/webdriver.d.ts +48 -0
  353. package/build/utils/interception/webdriver.d.ts.map +1 -0
  354. package/build/utils/interception/webdriver.js +75 -0
  355. package/build/utils/refetchElement.d.ts +6 -0
  356. package/build/utils/refetchElement.d.ts.map +1 -0
  357. package/build/utils/refetchElement.js +32 -0
  358. package/package.json +11 -11
@@ -0,0 +1,44 @@
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 __1 = __importDefault(require("./browser/$$"));
7
+ const _1 = __importDefault(require("./browser/$"));
8
+ const call_1 = __importDefault(require("./browser/call"));
9
+ const custom__1 = __importDefault(require("./browser/custom$$"));
10
+ const custom_1 = __importDefault(require("./browser/custom$"));
11
+ const debug_1 = __importDefault(require("./browser/debug"));
12
+ const deleteCookies_1 = __importDefault(require("./browser/deleteCookies"));
13
+ const execute_1 = __importDefault(require("./browser/execute"));
14
+ const executeAsync_1 = __importDefault(require("./browser/executeAsync"));
15
+ const getCookies_1 = __importDefault(require("./browser/getCookies"));
16
+ const getPuppeteer_1 = __importDefault(require("./browser/getPuppeteer"));
17
+ const getWindowSize_1 = __importDefault(require("./browser/getWindowSize"));
18
+ const keys_1 = __importDefault(require("./browser/keys"));
19
+ const mock_1 = __importDefault(require("./browser/mock"));
20
+ const mockClearAll_1 = __importDefault(require("./browser/mockClearAll"));
21
+ const mockRestoreAll_1 = __importDefault(require("./browser/mockRestoreAll"));
22
+ const newWindow_1 = __importDefault(require("./browser/newWindow"));
23
+ const pause_1 = __importDefault(require("./browser/pause"));
24
+ const react__1 = __importDefault(require("./browser/react$$"));
25
+ const react_1 = __importDefault(require("./browser/react$"));
26
+ const reloadSession_1 = __importDefault(require("./browser/reloadSession"));
27
+ const savePDF_1 = __importDefault(require("./browser/savePDF"));
28
+ const saveRecordingScreen_1 = __importDefault(require("./browser/saveRecordingScreen"));
29
+ const saveScreenshot_1 = __importDefault(require("./browser/saveScreenshot"));
30
+ const setCookies_1 = __importDefault(require("./browser/setCookies"));
31
+ const setTimeout_1 = __importDefault(require("./browser/setTimeout"));
32
+ const setWindowSize_1 = __importDefault(require("./browser/setWindowSize"));
33
+ const switchWindow_1 = __importDefault(require("./browser/switchWindow"));
34
+ const throttle_1 = __importDefault(require("./browser/throttle"));
35
+ const touchAction_1 = __importDefault(require("./browser/touchAction"));
36
+ const uploadFile_1 = __importDefault(require("./browser/uploadFile"));
37
+ const url_1 = __importDefault(require("./browser/url"));
38
+ const waitUntil_1 = __importDefault(require("./browser/waitUntil"));
39
+ exports.default = {
40
+ $$: __1.default, $: _1.default, call: call_1.default, custom$$: custom__1.default, custom$: custom_1.default, debug: debug_1.default, deleteCookies: deleteCookies_1.default, execute: execute_1.default, executeAsync: executeAsync_1.default, getCookies: getCookies_1.default,
41
+ getPuppeteer: getPuppeteer_1.default, getWindowSize: getWindowSize_1.default, keys: keys_1.default, mock: mock_1.default, mockClearAll: mockClearAll_1.default, mockRestoreAll: mockRestoreAll_1.default, newWindow: newWindow_1.default, pause: pause_1.default,
42
+ react$$: react__1.default, react$: react_1.default, reloadSession: reloadSession_1.default, savePDF: savePDF_1.default, saveRecordingScreen: saveRecordingScreen_1.default, saveScreenshot: saveScreenshot_1.default, setCookies: setCookies_1.default,
43
+ setTimeout: setTimeout_1.default, setWindowSize: setWindowSize_1.default, switchWindow: switchWindow_1.default, throttle: throttle_1.default, touchAction: touchAction_1.default, uploadFile: uploadFile_1.default, url: url_1.default, waitUntil: waitUntil_1.default
44
+ };
@@ -0,0 +1,19 @@
1
+ import { TouchAction, TouchActions } from '../types';
2
+ interface FormattedTouchAction extends Omit<TouchAction, 'element'> {
3
+ element?: string;
4
+ }
5
+ interface FormattedActions {
6
+ action: string;
7
+ options?: FormattedTouchAction;
8
+ }
9
+ export declare const formatArgs: (scope: WebdriverIO.Browser | WebdriverIO.Element, actions: TouchActions[]) => FormattedActions[];
10
+ /**
11
+ * Make sure action has proper options before sending command to Appium.
12
+ *
13
+ * @param {Object} params touchAction parameters
14
+ * @return null
15
+ */
16
+ export declare const validateParameters: (params: FormattedActions) => void;
17
+ export declare const touchAction: (this: WebdriverIO.Browser | WebdriverIO.Element, actions: TouchActions) => Promise<void>;
18
+ export {};
19
+ //# sourceMappingURL=constant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constant.d.ts","sourceRoot":"","sources":["../../src/commands/constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AASpD,UAAU,oBAAqB,SAAQ,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,gBAAgB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,oBAAoB,CAAA;CACjC;AAED,eAAO,MAAM,UAAU,UACZ,YAAY,OAAO,GAAG,mBAAmB,WACvC,YAAY,EAAE,KACxB,gBAAgB,EAsClB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,WAAY,gBAAgB,SA8B1D,CAAA;AAED,eAAO,MAAM,WAAW,SACd,YAAY,OAAO,GAAG,mBAAmB,WACtC,YAAY,kBAgBxB,CAAA"}
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.touchAction = exports.validateParameters = exports.formatArgs = void 0;
4
+ /**
5
+ * Constants around commands
6
+ */
7
+ const TOUCH_ACTIONS = ['press', 'longPress', 'tap', 'moveTo', 'wait', 'release'];
8
+ const POS_ACTIONS = TOUCH_ACTIONS.slice(0, 4);
9
+ const ACCEPTED_OPTIONS = ['x', 'y', 'element'];
10
+ const formatArgs = function (scope, actions) {
11
+ return actions.map((action) => {
12
+ if (Array.isArray(action)) {
13
+ return (0, exports.formatArgs)(scope, action);
14
+ }
15
+ if (typeof action === 'string') {
16
+ action = { action };
17
+ }
18
+ const formattedAction = {
19
+ action: action.action,
20
+ options: {}
21
+ };
22
+ /**
23
+ * don't propagate for actions that don't require element options
24
+ */
25
+ const actionElement = action.element && typeof action.element.elementId === 'string'
26
+ ? action.element.elementId
27
+ : scope.elementId;
28
+ if (POS_ACTIONS.includes(action.action) && formattedAction.options && actionElement) {
29
+ formattedAction.options.element = actionElement;
30
+ }
31
+ if (formattedAction.options && typeof action.x === 'number' && isFinite(action.x))
32
+ formattedAction.options.x = action.x;
33
+ if (formattedAction.options && typeof action.y === 'number' && isFinite(action.y))
34
+ formattedAction.options.y = action.y;
35
+ if (formattedAction.options && action.ms)
36
+ formattedAction.options.ms = action.ms;
37
+ /**
38
+ * remove options property if empty
39
+ */
40
+ if (formattedAction.options && Object.keys(formattedAction.options).length === 0) {
41
+ delete formattedAction.options;
42
+ }
43
+ return formattedAction;
44
+ });
45
+ };
46
+ exports.formatArgs = formatArgs;
47
+ /**
48
+ * Make sure action has proper options before sending command to Appium.
49
+ *
50
+ * @param {Object} params touchAction parameters
51
+ * @return null
52
+ */
53
+ const validateParameters = (params) => {
54
+ const options = Object.keys(params.options || {});
55
+ if (params.action === 'release' && options.length !== 0) {
56
+ throw new Error('action "release" doesn\'t accept any options ' +
57
+ `("${options.join('", "')}" found)`);
58
+ }
59
+ if (params.action === 'wait' &&
60
+ (options.includes('x') || options.includes('y'))) {
61
+ throw new Error('action "wait" doesn\'t accept x or y options');
62
+ }
63
+ if (POS_ACTIONS.includes(params.action)) {
64
+ for (const option in params.options) {
65
+ if (!ACCEPTED_OPTIONS.includes(option)) {
66
+ throw new Error(`action "${params.action}" doesn't accept "${option}" as option`);
67
+ }
68
+ }
69
+ if (options.length === 0) {
70
+ throw new Error(`Touch actions like "${params.action}" need at least some kind of ` +
71
+ 'position information like "element", "x" or "y" options, you\'ve none given.');
72
+ }
73
+ }
74
+ };
75
+ exports.validateParameters = validateParameters;
76
+ const touchAction = function (actions) {
77
+ if (!this.multiTouchPerform || !this.touchPerform) {
78
+ throw new Error('touchAction can be used with Appium only.');
79
+ }
80
+ if (!Array.isArray(actions)) {
81
+ actions = [actions];
82
+ }
83
+ const formattedAction = (0, exports.formatArgs)(this, actions);
84
+ const protocolCommand = Array.isArray(actions[0])
85
+ // cast old JSONWP
86
+ ? this.multiTouchPerform.bind(this)
87
+ : this.touchPerform.bind(this);
88
+ formattedAction.forEach((params) => (0, exports.validateParameters)(params));
89
+ return protocolCommand(formattedAction);
90
+ };
91
+ exports.touchAction = touchAction;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The `$$` command is a short way to call the [`findElements`](/docs/api/webdriver#findelements) command in order
3
+ * to fetch multiple elements on the page similar to the `$$` command from the browser scope. The difference when calling
4
+ * it from an element scope is that the driver will look within the children of that element.
5
+ *
6
+ * :::info
7
+ *
8
+ * For more information on how to select specific elements, check out the [Selectors](/docs/selectors) guide.
9
+ *
10
+ * :::
11
+ *
12
+ * <example>
13
+ :index.html
14
+ <ul id="menu">
15
+ <li><a href="/">Home</a></li>
16
+ <li><a href="/">Developer Guide</a></li>
17
+ <li><a href="/">API</a></li>
18
+ <li><a href="/">Contribute</a></li>
19
+ </ul>
20
+ :$.js
21
+ it('should get text a menu link', async () => {
22
+ const text = await $('#menu');
23
+ console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
24
+ });
25
+
26
+ it('should get text a menu link - JS Function', async () => {
27
+ const text = await $('#menu');
28
+ console.log(await text.$$(function() { // Arrow function is not allowed here.
29
+ // this is Element https://developer.mozilla.org/en-US/docs/Web/API/Element
30
+ // in this particular example it is HTMLUListElement
31
+ // TypeScript users may do something like this
32
+ // return (this as Element).querySelectorAll('li')
33
+ return this.querySelectorAll('li'); // Element[]
34
+ })[2].$('a').getText()); // outputs: "API"
35
+ });
36
+ * </example>
37
+ *
38
+ * @alias $$
39
+ * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch multiple elements
40
+ * @return {ElementArray}
41
+ * @type utility
42
+ *
43
+ */
44
+ import $$ from '../browser/$$';
45
+ export default $$;
46
+ //# sourceMappingURL=$$.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"$$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/$$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,OAAO,EAAE,MAAM,eAAe,CAAA;AAC9B,eAAe,EAAE,CAAA"}
@@ -0,0 +1,50 @@
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
+ /**
7
+ * The `$$` command is a short way to call the [`findElements`](/docs/api/webdriver#findelements) command in order
8
+ * to fetch multiple elements on the page similar to the `$$` command from the browser scope. The difference when calling
9
+ * it from an element scope is that the driver will look within the children of that element.
10
+ *
11
+ * :::info
12
+ *
13
+ * For more information on how to select specific elements, check out the [Selectors](/docs/selectors) guide.
14
+ *
15
+ * :::
16
+ *
17
+ * <example>
18
+ :index.html
19
+ <ul id="menu">
20
+ <li><a href="/">Home</a></li>
21
+ <li><a href="/">Developer Guide</a></li>
22
+ <li><a href="/">API</a></li>
23
+ <li><a href="/">Contribute</a></li>
24
+ </ul>
25
+ :$.js
26
+ it('should get text a menu link', async () => {
27
+ const text = await $('#menu');
28
+ console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
29
+ });
30
+
31
+ it('should get text a menu link - JS Function', async () => {
32
+ const text = await $('#menu');
33
+ console.log(await text.$$(function() { // Arrow function is not allowed here.
34
+ // this is Element https://developer.mozilla.org/en-US/docs/Web/API/Element
35
+ // in this particular example it is HTMLUListElement
36
+ // TypeScript users may do something like this
37
+ // return (this as Element).querySelectorAll('li')
38
+ return this.querySelectorAll('li'); // Element[]
39
+ })[2].$('a').getText()); // outputs: "API"
40
+ });
41
+ * </example>
42
+ *
43
+ * @alias $$
44
+ * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch multiple elements
45
+ * @return {ElementArray}
46
+ * @type utility
47
+ *
48
+ */
49
+ const __1 = __importDefault(require("../browser/$$"));
50
+ exports.default = __1.default;
@@ -0,0 +1,72 @@
1
+ /**
2
+ * The `$` command is a short way to call the [`findElement`](/docs/api/webdriver#findelement) command in order
3
+ * to fetch a single element on the page similar to the `$` command from the browser scope. The difference when calling
4
+ * it from an element scope is that the driver will look within the children of that element. You can also pass in an object as selector
5
+ * where the object contains a property `element-6066-11e4-a52e-4f735466cecf` with the value of a reference
6
+ * to an element. The command will then transform the reference to an extended WebdriverIO element.
7
+ *
8
+ * Note: chaining `$` and `$$` commands only make sense when you use multiple selector strategies. You will otherwise
9
+ * make unnecessary requests that slow down the test (e.g. `$('body').$('div')` will trigger two request whereas
10
+ * `$('body div')` does literally the same with just one request)
11
+ *
12
+ * :::info
13
+ *
14
+ * For more information on how to select specific elements, check out the [Selectors](/docs/selectors) guide.
15
+ *
16
+ * :::
17
+ *
18
+ * <example>
19
+ :index.html
20
+ <ul id="menu">
21
+ <li><a href="/">Home</a></li>
22
+ <li><a href="/">Developer Guide</a></li>
23
+ <li><a href="/">API</a></li>
24
+ <li><a href="/">Contribute</a></li>
25
+ </ul>
26
+ :$.js
27
+ it('should get text a menu link', async () => {
28
+ const text = await $('#menu');
29
+ console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
30
+ });
31
+
32
+ it('should get text a menu link - JS Function', async () => {
33
+ const text = await $('#menu');
34
+ console.log(await text.$$('li')[2].$(function() { // Arrow function is not allowed here.
35
+ // this is Element https://developer.mozilla.org/en-US/docs/Web/API/Element
36
+ // in this particular example it is HTMLLIElement
37
+ // TypeScript users may do something like this
38
+ // return (this as Element).querySelector('a')
39
+ return this.querySelector('a'); // Element
40
+ }).getText()); // outputs: "API"
41
+ });
42
+
43
+ it('should allow to convert protocol result of an element into a WebdriverIO element', async () => {
44
+ const activeElement = await browser.getActiveElement();
45
+ console.log(await $(activeElement).getTagName()); // outputs active element
46
+ });
47
+
48
+ it('should use Androids DataMatcher or ViewMatcher selector', async () => {
49
+ const menuItem = await $({
50
+ "name": "hasEntry",
51
+ "args": ["title", "ViewTitle"],
52
+ "class": "androidx.test.espresso.matcher.ViewMatchers"
53
+ });
54
+ await menuItem.click();
55
+
56
+ const menuItem = await $({
57
+ "name": "hasEntry",
58
+ "args": ["title", "ViewTitle"]
59
+ });
60
+ await menuItem.click();
61
+ });
62
+ * </example>
63
+ *
64
+ * @alias $
65
+ * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch a certain element
66
+ * @return {Element}
67
+ * @type utility
68
+ *
69
+ */
70
+ import $ from '../browser/$';
71
+ export default $;
72
+ //# sourceMappingURL=$.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"$.d.ts","sourceRoot":"","sources":["../../../src/commands/element/$.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,OAAO,CAAC,MAAM,cAAc,CAAA;AAC5B,eAAe,CAAC,CAAA"}
@@ -0,0 +1,76 @@
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
+ /**
7
+ * The `$` command is a short way to call the [`findElement`](/docs/api/webdriver#findelement) command in order
8
+ * to fetch a single element on the page similar to the `$` command from the browser scope. The difference when calling
9
+ * it from an element scope is that the driver will look within the children of that element. You can also pass in an object as selector
10
+ * where the object contains a property `element-6066-11e4-a52e-4f735466cecf` with the value of a reference
11
+ * to an element. The command will then transform the reference to an extended WebdriverIO element.
12
+ *
13
+ * Note: chaining `$` and `$$` commands only make sense when you use multiple selector strategies. You will otherwise
14
+ * make unnecessary requests that slow down the test (e.g. `$('body').$('div')` will trigger two request whereas
15
+ * `$('body div')` does literally the same with just one request)
16
+ *
17
+ * :::info
18
+ *
19
+ * For more information on how to select specific elements, check out the [Selectors](/docs/selectors) guide.
20
+ *
21
+ * :::
22
+ *
23
+ * <example>
24
+ :index.html
25
+ <ul id="menu">
26
+ <li><a href="/">Home</a></li>
27
+ <li><a href="/">Developer Guide</a></li>
28
+ <li><a href="/">API</a></li>
29
+ <li><a href="/">Contribute</a></li>
30
+ </ul>
31
+ :$.js
32
+ it('should get text a menu link', async () => {
33
+ const text = await $('#menu');
34
+ console.log(await text.$$('li')[2].$('a').getText()); // outputs: "API"
35
+ });
36
+
37
+ it('should get text a menu link - JS Function', async () => {
38
+ const text = await $('#menu');
39
+ console.log(await text.$$('li')[2].$(function() { // Arrow function is not allowed here.
40
+ // this is Element https://developer.mozilla.org/en-US/docs/Web/API/Element
41
+ // in this particular example it is HTMLLIElement
42
+ // TypeScript users may do something like this
43
+ // return (this as Element).querySelector('a')
44
+ return this.querySelector('a'); // Element
45
+ }).getText()); // outputs: "API"
46
+ });
47
+
48
+ it('should allow to convert protocol result of an element into a WebdriverIO element', async () => {
49
+ const activeElement = await browser.getActiveElement();
50
+ console.log(await $(activeElement).getTagName()); // outputs active element
51
+ });
52
+
53
+ it('should use Androids DataMatcher or ViewMatcher selector', async () => {
54
+ const menuItem = await $({
55
+ "name": "hasEntry",
56
+ "args": ["title", "ViewTitle"],
57
+ "class": "androidx.test.espresso.matcher.ViewMatchers"
58
+ });
59
+ await menuItem.click();
60
+
61
+ const menuItem = await $({
62
+ "name": "hasEntry",
63
+ "args": ["title", "ViewTitle"]
64
+ });
65
+ await menuItem.click();
66
+ });
67
+ * </example>
68
+ *
69
+ * @alias $
70
+ * @param {String|Function|Matcher} selector selector, JS Function, or Matcher object to fetch a certain element
71
+ * @return {Element}
72
+ * @type utility
73
+ *
74
+ */
75
+ const _1 = __importDefault(require("../browser/$"));
76
+ exports.default = _1.default;
@@ -0,0 +1,33 @@
1
+ export declare type CommandOptions = {
2
+ translateToUnicode?: boolean;
3
+ };
4
+ export declare type Value = string | number;
5
+ /**
6
+ *
7
+ * Add a value to an object found by given selector. You can also use unicode
8
+ * characters like Left arrow or Back space. WebdriverIO will take care of
9
+ * translating them into unicode characters. You’ll find all supported characters
10
+ * [here](https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions).
11
+ * To do that, the value has to correspond to a key from the table. It can be disabled
12
+ * by setting `translateToUnicode` optional parameter to false.
13
+ *
14
+ * <example>
15
+ :addValue.js
16
+ it('should demonstrate the addValue command', async () => {
17
+ let input = await $('.input')
18
+ await input.addValue('test')
19
+ await input.addValue(123)
20
+
21
+ value = await input.getValue()
22
+ assert(value === 'test123') // true
23
+ })
24
+ * </example>
25
+ *
26
+ * @alias element.addValue
27
+ * @param {string | number | Array<string | number>} value value to be added
28
+ * @param {CommandOptions=} options command options (optional)
29
+ * @param {boolean} options.translateToUnicode enable translation string to unicode value automatically
30
+ *
31
+ */
32
+ export default function addValue(this: WebdriverIO.Element, value: Value | Value[], { translateToUnicode }?: CommandOptions): Promise<void>;
33
+ //# sourceMappingURL=addValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addValue.d.ts","sourceRoot":"","sources":["../../../src/commands/element/addValue.ts"],"names":[],"mappings":"AAKA,oBAAY,cAAc,GAAG;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC/B,CAAA;AAED,oBAAY,KAAK,GAAG,MAAM,GAAG,MAAM,CAAA;AASnC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC5B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,KAAK,EAAE,KAAK,GAAG,KAAK,EAAE,EACtB,EAAE,kBAAyB,EAAE,GAAE,cAAmB,iBAWrD"}
@@ -0,0 +1,48 @@
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("../../utils");
7
+ const logger_1 = __importDefault(require("@wdio/logger"));
8
+ const log = (0, logger_1.default)('addValue');
9
+ const isNumberOrString = (input) => typeof input === 'string' || typeof input === 'number';
10
+ const isValidType = (value) => (isNumberOrString(value) ||
11
+ Array.isArray(value) && value.every((item) => isNumberOrString(item)));
12
+ /**
13
+ *
14
+ * Add a value to an object found by given selector. You can also use unicode
15
+ * characters like Left arrow or Back space. WebdriverIO will take care of
16
+ * translating them into unicode characters. You’ll find all supported characters
17
+ * [here](https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions).
18
+ * To do that, the value has to correspond to a key from the table. It can be disabled
19
+ * by setting `translateToUnicode` optional parameter to false.
20
+ *
21
+ * <example>
22
+ :addValue.js
23
+ it('should demonstrate the addValue command', async () => {
24
+ let input = await $('.input')
25
+ await input.addValue('test')
26
+ await input.addValue(123)
27
+
28
+ value = await input.getValue()
29
+ assert(value === 'test123') // true
30
+ })
31
+ * </example>
32
+ *
33
+ * @alias element.addValue
34
+ * @param {string | number | Array<string | number>} value value to be added
35
+ * @param {CommandOptions=} options command options (optional)
36
+ * @param {boolean} options.translateToUnicode enable translation string to unicode value automatically
37
+ *
38
+ */
39
+ function addValue(value, { translateToUnicode = true } = {}) {
40
+ if (!isValidType(value)) {
41
+ log.warn('@deprecated: support for type "string", "number" or "Array<string | number>" is deprecated');
42
+ }
43
+ if (!this.isW3C) {
44
+ return this.elementSendKeys(this.elementId, (0, utils_1.transformToCharString)(value, translateToUnicode));
45
+ }
46
+ return this.elementSendKeys(this.elementId, (0, utils_1.transformToCharString)(value, translateToUnicode).join(''));
47
+ }
48
+ exports.default = addValue;
@@ -0,0 +1,28 @@
1
+ /**
2
+ *
3
+ * Clear a `<textarea>` or text `<input>` element’s value. Make sure you can interact with the
4
+ * element before using this command. You can't clear an input element that is disabled or in
5
+ * readonly mode.
6
+ *
7
+ * <example>
8
+ :clearValue.js
9
+ it('should demonstrate the clearValue command', async () => {
10
+ const elem = await $('.input')
11
+ await elem.setValue('test123')
12
+
13
+ const value = await elem.getValue()
14
+ console.log(value) // returns 'test123'
15
+
16
+ await elem.clearValue()
17
+ value = await elem.getValue()
18
+ assert(value === ''); // true
19
+ })
20
+ * </example>
21
+ *
22
+ * @alias element.clearValue
23
+ * @uses protocol/elements, protocol/elementIdClear
24
+ * @type action
25
+ *
26
+ */
27
+ export default function clearValue(this: WebdriverIO.Element): Promise<void>;
28
+ //# sourceMappingURL=clearValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clearValue.d.ts","sourceRoot":"","sources":["../../../src/commands/element/clearValue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAE,IAAI,EAAE,WAAW,CAAC,OAAO,iBAE5D"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ *
4
+ * Clear a `<textarea>` or text `<input>` element’s value. Make sure you can interact with the
5
+ * element before using this command. You can't clear an input element that is disabled or in
6
+ * readonly mode.
7
+ *
8
+ * <example>
9
+ :clearValue.js
10
+ it('should demonstrate the clearValue command', async () => {
11
+ const elem = await $('.input')
12
+ await elem.setValue('test123')
13
+
14
+ const value = await elem.getValue()
15
+ console.log(value) // returns 'test123'
16
+
17
+ await elem.clearValue()
18
+ value = await elem.getValue()
19
+ assert(value === ''); // true
20
+ })
21
+ * </example>
22
+ *
23
+ * @alias element.clearValue
24
+ * @uses protocol/elements, protocol/elementIdClear
25
+ * @type action
26
+ *
27
+ */
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ function clearValue() {
30
+ return this.elementClear(this.elementId);
31
+ }
32
+ exports.default = clearValue;
@@ -0,0 +1,73 @@
1
+ import { ClickOptions } from '../../types';
2
+ /**
3
+ *
4
+ * Click on an element.
5
+ *
6
+ * Note: This issues a WebDriver `click` command for the selected element, which generally scrolls to and then clicks the
7
+ * selected element. However, if you have fixed-position elements (such as a fixed header or footer) that cover up the
8
+ * selected element after it is scrolled within the viewport, the click will be issued at the given coordinates, but will
9
+ * be received by your fixed (overlaying) element. In these cased the following error is thrown:
10
+ *
11
+ * ```
12
+ * Element is not clickable at point (x, x). Other element would receive the click: ..."
13
+ * ```
14
+ *
15
+ * To work around this, try to find the overlaying element and remove it via `execute` command so it doesn't interfere
16
+ * the click. You also can try to scroll to the element yourself using `scroll` with an offset appropriate for your
17
+ * scenario.
18
+ *
19
+ * <example>
20
+ :example.html
21
+ <button id="myButton" onclick="document.getElementById('someText').innerHTML='I was clicked'">Click me</button>
22
+ <div id="someText">I was not clicked</div>
23
+ :click.js
24
+ it('should demonstrate the click command', async () => {
25
+ const myButton = await $('#myButton')
26
+ await myButton.click()
27
+ const myText = await $('#someText')
28
+ const text = await myText.getText()
29
+ assert(text === 'I was clicked') // true
30
+ })
31
+ :example.js
32
+ it('should fetch menu links and visit each page', async () => {
33
+ const links = await $$('#menu a')
34
+ await links.forEach(async (link) => {
35
+ await link.click()
36
+ })
37
+ })
38
+ * </example>
39
+ *
40
+ * <example>
41
+ :example.html
42
+ <button id="myButton">Click me</button>
43
+ :example.js
44
+ it('should demonstrate a click using an offset', async () => {
45
+ const myButton = await $('#myButton')
46
+ await myButton.click({ x: 30 }) // clicks 30 horizontal pixels away from location of the button (from center point of element)
47
+ })
48
+ * </example>
49
+ *
50
+ * <example>
51
+ :example.html
52
+ <button id="myButton">Click me</button>
53
+ :example.js
54
+ it('should demonstrate a right click passed as string', async () => {
55
+ const myButton = await $('#myButton')
56
+ await myButton.click({ button: 'right' }) // opens the contextmenu at the location of the button
57
+ })
58
+ it('should demonstrate a right click passed as number while adding an offset', async () => {
59
+ const myButton = await $('#myButton')
60
+ await myButton.click({ button: 2, x: 30, y: 40 }) // opens the contextmenu 30 horizontal and 40 vertical pixels away from location of the button (from the center of element)
61
+ })
62
+ * </example>
63
+ *
64
+ * @alias element.click
65
+ * @uses protocol/element, protocol/elementIdClick, protocol/performActions, protocol/positionClick
66
+ * @type action
67
+ * @param {ClickOptions=} options click options (optional)
68
+ * @param {string= | number=} options.button can be one of [0, "left", 1, "middle", 2, "right"] (optional)
69
+ * @param {number=} options.x Number (optional)
70
+ * @param {number=} options.y Number (optional)
71
+ */
72
+ export default function click(this: WebdriverIO.Element, options?: ClickOptions): Promise<void>;
73
+ //# sourceMappingURL=click.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"click.d.ts","sourceRoot":"","sources":["../../../src/commands/element/click.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAI1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,wBAA8B,KAAK,CAC/B,IAAI,EAAE,WAAW,CAAC,OAAO,EACzB,OAAO,CAAC,EAAE,YAAY,iBAuEzB"}