process.json 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. },
  14. "execute": [
  15. {
  16. "type": "schedule",
  17. "condition": {
  18. "interval": "1s",
  19. "repeat": -1
  20. },
  21. "interval": [
  22. {
  23. "type": "random",
  24. "inVars": ["1", "3"],
  25. "outVars": ["{swipeCount}"]
  26. },
  27. {
  28. "type": "schedule",
  29. "condition": {
  30. "interval": "1s",
  31. "repeat": "{swipeCount}"
  32. },
  33. "interval": [
  34. {
  35. "type": "fun",
  36. "method": "adb-swipe",
  37. "inVars": ["down-up"],
  38. "outVars": []
  39. }
  40. ]
  41. },
  42. {
  43. "type": "random",
  44. "inVars": ["200", "880"],
  45. "outVars": ["{clickX}"]
  46. },
  47. {
  48. "type": "random",
  49. "inVars": ["400", "2000"],
  50. "outVars": ["{clickY}"]
  51. },
  52. {
  53. "type": "set",
  54. "variable": "{random-click-pos}",
  55. "value": "{clickX},{clickY}"
  56. },
  57. {
  58. "type": "fun",
  59. "method": "adb-click",
  60. "inVars": ["{random-click-pos}"]
  61. },
  62. {
  63. "type": "random",
  64. "inVars": [10, 2000],
  65. "outVars": ["{stay-duration}"]
  66. },
  67. {
  68. "type": "delay",
  69. "value": "{{stay-duration}}m"
  70. },
  71. {
  72. "type": "random",
  73. "inVars": [0, 1],
  74. "outVars": ["{b-like-click}"]
  75. },
  76. {
  77. "type": "if",
  78. "condition": "{b-like-click} == 1",
  79. "ture": [
  80. {
  81. "type": "try",
  82. "continueAfterFail": true,
  83. "try": [
  84. {
  85. "type": "fun",
  86. "method": "img-center-point-location",
  87. "inVars": ["视频点赞.png"],
  88. "outVars": ["{send-btn-pos}"]
  89. }
  90. ],
  91. "fail": [
  92. {
  93. "type": "fun",
  94. "method": "img-center-point-location",
  95. "inVars": ["图文点赞.png"],
  96. "outVars": ["{send-btn-pos}"]
  97. }
  98. ]
  99. },
  100. {
  101. "type": "fun",
  102. "method": "adb-click",
  103. "inVars": ["{send-btn-pos}"]
  104. }
  105. ]
  106. },
  107. {
  108. "type": "random",
  109. "inVars": [5, 12],
  110. "outVars": ["{back-duration}"]
  111. },
  112. {
  113. "type": "delay",
  114. "value": "{{back-duration}}s"
  115. },
  116. {
  117. "type": "fun",
  118. "method": "adb-keyevent",
  119. "inVars": ["4"],
  120. "outVars": []
  121. }
  122. ]
  123. }
  124. ]
  125. }