|
|
@@ -7109,7 +7109,8 @@ object WeworkOperationImpl {
|
|
|
sleep(Constant.CHANGE_PAGE_INTERVAL)
|
|
|
AccessibilityUtil.scrollToTop(WeworkController.weworkService, getRoot())
|
|
|
val customerFlag =
|
|
|
- AccessibilityUtil.findAllByText(getRoot(), "我的客户","我的学员", exact = true).lastOrNull()
|
|
|
+ AccessibilityUtil.findAllByText(getRoot(), "我的客户", "我的学员", exact = true)
|
|
|
+ .lastOrNull()
|
|
|
if (customerFlag != null) {
|
|
|
AccessibilityUtil.performClick(customerFlag)
|
|
|
AccessibilityExtraUtil.loadingPage("BaseContentActivity")
|
|
|
@@ -7126,12 +7127,17 @@ object WeworkOperationImpl {
|
|
|
return false
|
|
|
}
|
|
|
val allCustomer =
|
|
|
- AccessibilityUtil.findOneByText(getRoot(), "全部微信客户","全部微信学员")
|
|
|
+ AccessibilityUtil.findOneByText(getRoot(), "全部微信客户", "全部微信学员")
|
|
|
if (allCustomer != null) {
|
|
|
AccessibilityUtil.performClick(allCustomer)
|
|
|
AccessibilityExtraUtil.loadingPage("BaseContentActivity")
|
|
|
val oneCustomer =
|
|
|
- AccessibilityUtil.findOneByText(getRoot(), "单向微信客户","单向微信学员", exact = true)
|
|
|
+ AccessibilityUtil.findOneByText(
|
|
|
+ getRoot(),
|
|
|
+ "单向微信客户",
|
|
|
+ "单向微信学员",
|
|
|
+ exact = true
|
|
|
+ )
|
|
|
if (oneCustomer != null) {
|
|
|
AccessibilityUtil.performClick(oneCustomer)
|
|
|
sleep(500)
|
|
|
@@ -7228,7 +7234,7 @@ object WeworkOperationImpl {
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
uploadCommandResult(
|
|
|
message,
|
|
|
ExecCallbackBean.ERROR_TARGET,
|
|
|
@@ -7238,4 +7244,79 @@ object WeworkOperationImpl {
|
|
|
}
|
|
|
return true
|
|
|
}
|
|
|
+
|
|
|
+ fun lookNews(message: WeworkMessageBean): Boolean {
|
|
|
+ val startTime = System.currentTimeMillis()
|
|
|
+ goHomeTab("工作台")
|
|
|
+ sleep(Constant.CHANGE_PAGE_INTERVAL)
|
|
|
+ val news = AccessibilityUtil.scrollAndFindByText(
|
|
|
+ WeworkController.weworkService,
|
|
|
+ getRoot(),
|
|
|
+ "行业资讯",
|
|
|
+ exact = true
|
|
|
+ )
|
|
|
+ if (news != null) {
|
|
|
+ AccessibilityUtil.performClick(news)
|
|
|
+ sleep(Constant.CHANGE_PAGE_INTERVAL)
|
|
|
+ val recommend =
|
|
|
+ AccessibilityUtil.findAllByClazz(getRoot(), Views.ImageView).firstOrNull()
|
|
|
+ AccessibilityUtil.performClick(recommend)
|
|
|
+ val look = AccessibilityUtil.findOneByText(getRoot(), "在看", exact = true)
|
|
|
+ if (look != null) {
|
|
|
+ AccessibilityUtil.performClick(look)
|
|
|
+ }
|
|
|
+// else {
|
|
|
+// val scrollView = AccessibilityUtil.findOnceByClazz(getRoot(), Views.FrameLayout)
|
|
|
+// if (scrollView != null) {
|
|
|
+// AccessibilityUtil.scrollToBottom(
|
|
|
+// WeworkController.weworkService,
|
|
|
+// scrollView,
|
|
|
+// maxRetry = 100
|
|
|
+// )
|
|
|
+// }
|
|
|
+// }
|
|
|
+ }
|
|
|
+ return true
|
|
|
+ }
|
|
|
+
|
|
|
+ fun dailyReport(message: WeworkMessageBean): Boolean {
|
|
|
+ val startTime = System.currentTimeMillis()
|
|
|
+ goHomeTab("工作台")
|
|
|
+ sleep(Constant.CHANGE_PAGE_INTERVAL)
|
|
|
+ val news = AccessibilityUtil.scrollAndFindByText(
|
|
|
+ WeworkController.weworkService,
|
|
|
+ getRoot(),
|
|
|
+ "汇报",
|
|
|
+ exact = true
|
|
|
+ )
|
|
|
+ if (news != null) {
|
|
|
+ AccessibilityUtil.performClick(news)
|
|
|
+ val dailyReport = AccessibilityUtil.findOneByText(getRoot(), "日报")
|
|
|
+ AccessibilityUtil.performClick(dailyReport)
|
|
|
+ sleep(20000)
|
|
|
+// val aa = AccessibilityUtil.findOnceByClazz(getRoot(), Views.EditText)
|
|
|
+// AccessibilityUtil.editTextInput(aa, "aa")
|
|
|
+// val bb = AccessibilityUtil.scrollAndFindByText(
|
|
|
+// WeworkController.weworkService,
|
|
|
+// getRoot(),
|
|
|
+// "提交"
|
|
|
+// )
|
|
|
+// AccessibilityUtil.performClick(bb)
|
|
|
+ val gridView = AccessibilityUtil.findOnceByClazz(getRoot(), Views.GridView)
|
|
|
+ if (gridView != null && gridView.childCount >= 1) {
|
|
|
+ val tvEmptySize = AccessibilityUtil.findAllOnceByClazz(gridView, Views.TextView)
|
|
|
+ .filter { it.text == null }.size
|
|
|
+ if (tvEmptySize == 0) {
|
|
|
+ LogUtils.e("没有找到列表")
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ LogUtils.d("点击拉人按钮")
|
|
|
+ AccessibilityUtil.performClick(gridView.getChild(gridView.childCount - 1))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return true
|
|
|
+ }
|
|
|
}
|