process.json 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. {
  2. "name": "RedNoteBrowsingAndThumbsUpTest",
  3. "description": "测试版小红书随机浏览和点赞",
  4. "variables": {
  5. "page-index": 0,
  6. "up-or-down": 0,
  7. "swipe-count": 0,
  8. "click-x": 0,
  9. "click-y": 0,
  10. "random-click-pos": "",
  11. "stay-duration": 0,
  12. "send-btn-pos": "",
  13. "b-like-click": 0,
  14. "back-duration": 0,
  15. "video_like_btn_center_pos": "",
  16. "note_text_like_btn_center_pos": ""
  17. },
  18. "execute": [
  19. {
  20. "type": "schedule",
  21. "condition": {
  22. "interval": "1s",
  23. "repeat": -1
  24. },
  25. "interval": [
  26. {
  27. "type": "random",
  28. "inVars": [
  29. "1",
  30. "3"
  31. ],
  32. "outVars": [
  33. "{swipe-count}"
  34. ]
  35. },
  36. {
  37. "type": "schedule",
  38. "condition": {
  39. "interval": "1s",
  40. "repeat": "{swipe-count}"
  41. },
  42. "interval": [
  43. {
  44. "type": "fun",
  45. "method": "adb-swipe",
  46. "inVars": [
  47. "down-up"
  48. ],
  49. "outVars": []
  50. }
  51. ]
  52. },
  53. {
  54. "type": "random",
  55. "inVars": [
  56. "200",
  57. "880"
  58. ],
  59. "outVars": [
  60. "{click-x}"
  61. ]
  62. },
  63. {
  64. "type": "random",
  65. "inVars": [
  66. "400",
  67. "2000"
  68. ],
  69. "outVars": [
  70. "{click-y}"
  71. ]
  72. },
  73. {
  74. "type": "set",
  75. "variable": "{random-click-pos}",
  76. "value": "{click-x},{click-y}"
  77. },
  78. {
  79. "type": "fun",
  80. "method": "adb-click",
  81. "inVars": [
  82. "{random-click-pos}"
  83. ],
  84. "outVars": []
  85. },
  86. {
  87. "type": "random",
  88. "inVars": [
  89. 10,
  90. 2000
  91. ],
  92. "outVars": [
  93. "{stay-duration}"
  94. ]
  95. },
  96. {
  97. "type": "delay",
  98. "value": "{{stay-duration}}m"
  99. },
  100. {
  101. "type": "random",
  102. "inVars": [
  103. 0,
  104. 1
  105. ],
  106. "outVars": [
  107. "{b-like-click}"
  108. ]
  109. },
  110. {
  111. "type": "if",
  112. "condition": "{b-like-click} == 1",
  113. "then": [
  114. {
  115. "type": "try",
  116. "continueAfterFail": true,
  117. "try": [
  118. {
  119. "type": "if",
  120. "condition": "{video_like_btn_center_pos} != \"\"",
  121. "then": [
  122. {
  123. "type": "fun",
  124. "method": "img-center-point-location",
  125. "inVars": [
  126. "视频点赞.png"
  127. ],
  128. "outVars": [
  129. "{send-btn-pos}"
  130. ]
  131. },
  132. {
  133. "type": "fun",
  134. "method": "persist-save",
  135. "inVars": [
  136. "rednote_test_video_like_btn",
  137. "{send-btn-pos}"
  138. ],
  139. "outVars": []
  140. }
  141. ],
  142. "else": [
  143. {
  144. "type": "fun",
  145. "method": "persist-read",
  146. "inVars": [
  147. "rednote_test_video_like_btn"
  148. ],
  149. "outVars": [
  150. "{send-btn-pos}"
  151. ]
  152. }
  153. ]
  154. }
  155. ],
  156. "fail": [
  157. {
  158. "type": "if",
  159. "condition": "{note_text_like_btn_center_pos} != \"\"",
  160. "then": [
  161. {
  162. "type": "fun",
  163. "method": "img-center-point-location",
  164. "inVars": [
  165. "图文点赞.png"
  166. ],
  167. "outVars": [
  168. "{send-btn-pos}"
  169. ]
  170. },
  171. {
  172. "type": "fun",
  173. "method": "persist-save",
  174. "inVars": [
  175. "rednote_test_note_text_like_btn",
  176. "{send-btn-pos}"
  177. ],
  178. "outVars": []
  179. }
  180. ],
  181. "else": [
  182. {
  183. "type": "fun",
  184. "method": "persist-read",
  185. "inVars": [
  186. "rednote_test_note_text_like_btn"
  187. ],
  188. "outVars": [
  189. "{send-btn-pos}"
  190. ]
  191. }
  192. ]
  193. }
  194. ],
  195. "success": []
  196. },
  197. {
  198. "type": "fun",
  199. "method": "adb-click",
  200. "inVars": [
  201. "{send-btn-pos}"
  202. ],
  203. "outVars": []
  204. }
  205. ],
  206. "else": []
  207. },
  208. {
  209. "type": "random",
  210. "inVars": [
  211. 5,
  212. 12
  213. ],
  214. "outVars": [
  215. "{back-duration}"
  216. ]
  217. },
  218. {
  219. "type": "delay",
  220. "value": "{{back-duration}}s"
  221. },
  222. {
  223. "type": "fun",
  224. "method": "adb-keyevent",
  225. "inVars": [
  226. "4"
  227. ],
  228. "outVars": []
  229. }
  230. ]
  231. }
  232. ]
  233. }