atom
This commit is contained in:
16
.idea/compiler.xml
generated
16
.idea/compiler.xml
generated
@@ -5,14 +5,14 @@
|
|||||||
<profile name="Gradle Imported" enabled="true">
|
<profile name="Gradle Imported" enabled="true">
|
||||||
<outputRelativeToContentRoot value="true" />
|
<outputRelativeToContentRoot value="true" />
|
||||||
<processorPath useClasspath="false">
|
<processorPath useClasspath="false">
|
||||||
<entry name="$PROJECT_DIR$/../../Git/bin/caches/modules-2/files-2.1/com.google.auto.service/auto-service/1.0-rc4/44954d465f3b9065388bbd2fc08a3eb8fd07917c/auto-service-1.0-rc4.jar" />
|
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.auto.service/auto-service/1.0-rc4/44954d465f3b9065388bbd2fc08a3eb8fd07917c/auto-service-1.0-rc4.jar" />
|
||||||
<entry name="$PROJECT_DIR$/../../Git/bin/caches/modules-2/files-2.1/com.google.auto/auto-common/0.8/c6f7af0e57b9d69d81b05434ef9f3c5610d498c4/auto-common-0.8.jar" />
|
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.auto/auto-common/0.8/c6f7af0e57b9d69d81b05434ef9f3c5610d498c4/auto-common-0.8.jar" />
|
||||||
<entry name="$PROJECT_DIR$/../../Git/bin/caches/modules-2/files-2.1/com.google.guava/guava/23.5-jre/e9ce4989adf6092a3dab6152860e93d989e8cf88/guava-23.5-jre.jar" />
|
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/23.5-jre/e9ce4989adf6092a3dab6152860e93d989e8cf88/guava-23.5-jre.jar" />
|
||||||
<entry name="$PROJECT_DIR$/../../Git/bin/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/1.3.9/40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf/jsr305-1.3.9.jar" />
|
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/1.3.9/40719ea6961c0cb6afaeb6a921eaa1f6afd4cfdf/jsr305-1.3.9.jar" />
|
||||||
<entry name="$PROJECT_DIR$/../../Git/bin/caches/modules-2/files-2.1/org.checkerframework/checker-qual/2.0.0/518929596ee3249127502a8573b2e008e2d51ed3/checker-qual-2.0.0.jar" />
|
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.checkerframework/checker-qual/2.0.0/518929596ee3249127502a8573b2e008e2d51ed3/checker-qual-2.0.0.jar" />
|
||||||
<entry name="$PROJECT_DIR$/../../Git/bin/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.0.18/5f65affce1684999e2f4024983835efc3504012e/error_prone_annotations-2.0.18.jar" />
|
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.0.18/5f65affce1684999e2f4024983835efc3504012e/error_prone_annotations-2.0.18.jar" />
|
||||||
<entry name="$PROJECT_DIR$/../../Git/bin/caches/modules-2/files-2.1/com.google.j2objc/j2objc-annotations/1.1/ed28ded51a8b1c6b112568def5f4b455e6809019/j2objc-annotations-1.1.jar" />
|
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.google.j2objc/j2objc-annotations/1.1/ed28ded51a8b1c6b112568def5f4b455e6809019/j2objc-annotations-1.1.jar" />
|
||||||
<entry name="$PROJECT_DIR$/../../Git/bin/caches/modules-2/files-2.1/org.codehaus.mojo/animal-sniffer-annotations/1.14/775b7e22fb10026eed3f86e8dc556dfafe35f2d5/animal-sniffer-annotations-1.14.jar" />
|
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.codehaus.mojo/animal-sniffer-annotations/1.14/775b7e22fb10026eed3f86e8dc556dfafe35f2d5/animal-sniffer-annotations-1.14.jar" />
|
||||||
</processorPath>
|
</processorPath>
|
||||||
<module name="fuzhu.arouter_compiler" />
|
<module name="fuzhu.arouter_compiler" />
|
||||||
</profile>
|
</profile>
|
||||||
|
|||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":174,"versionName":"1.7.4","enabled":true,"outputFile":"atom-latest.apk","fullName":"release","baseName":"release"},"path":"atom-latest.apk","properties":{}}]
|
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":175,"versionName":"1.7.5","enabled":true,"outputFile":"atom-latest.apk","fullName":"release","baseName":"release"},"path":"atom-latest.apk","properties":{}}]
|
||||||
@@ -127,6 +127,11 @@ public class ControlWindow {
|
|||||||
AblStepHandler.sendMsg(AblSteps.STEP_130);
|
AblStepHandler.sendMsg(AblSteps.STEP_130);
|
||||||
break;
|
break;
|
||||||
case "7":
|
case "7":
|
||||||
|
//潜在客户加关(大咖)
|
||||||
|
stutas(ChangLiang.isrun);
|
||||||
|
AblStepHandler.sendMsg(AblSteps.STEP_231);
|
||||||
|
break;
|
||||||
|
case "71":
|
||||||
//潜在客户加关(大咖)
|
//潜在客户加关(大咖)
|
||||||
stutas(ChangLiang.isrun);
|
stutas(ChangLiang.isrun);
|
||||||
AblStepHandler.sendMsg(AblSteps.STEP_170);
|
AblStepHandler.sendMsg(AblSteps.STEP_170);
|
||||||
@@ -244,10 +249,15 @@ public class ControlWindow {
|
|||||||
stutas(ChangLiang.isrun);
|
stutas(ChangLiang.isrun);
|
||||||
AblStepHandler.sendMsg(AblSteps.STEP_130);
|
AblStepHandler.sendMsg(AblSteps.STEP_130);
|
||||||
break;
|
break;
|
||||||
case "7"://潜在客户加关(大咖)
|
case "71"://潜在客户加关(大咖)
|
||||||
stutas(ChangLiang.isrun);
|
stutas(ChangLiang.isrun);
|
||||||
AblStepHandler.sendMsg(AblSteps.STEP_170);
|
AblStepHandler.sendMsg(AblSteps.STEP_170);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "7":
|
||||||
|
stutas(ChangLiang.isrun);
|
||||||
|
AblStepHandler.sendMsg(AblSteps.STEP_231);
|
||||||
|
break;
|
||||||
case "8"://潜在客户加关(关键词)
|
case "8"://潜在客户加关(关键词)
|
||||||
stutas(ChangLiang.isrun);
|
stutas(ChangLiang.isrun);
|
||||||
AblStepHandler.sendMsg(AblSteps.STEP_160);
|
AblStepHandler.sendMsg(AblSteps.STEP_160);
|
||||||
|
|||||||
@@ -174,8 +174,8 @@ class HongbaoBase extends BaseAblStep implements RedEnv.RedEnvFunc, RedEnv.TimeF
|
|||||||
// Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
// Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
||||||
for (int y = 0; y < child.getChildCount(); y++) {
|
for (int y = 0; y < child.getChildCount(); y++) {
|
||||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
AccessibilityNodeInfo child1 = child.getChild(y);
|
||||||
Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
// Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
||||||
nodeZuobiao(child1);
|
// nodeZuobiao(child1);
|
||||||
if ("android.widget.RelativeLayout".equals(child1.getClassName())) {
|
if ("android.widget.RelativeLayout".equals(child1.getClassName())) {
|
||||||
if (child1.getContentDescription() != null) {
|
if (child1.getContentDescription() != null) {
|
||||||
if (child1.getContentDescription().equals("礼物")) {
|
if (child1.getContentDescription().equals("礼物")) {
|
||||||
@@ -209,7 +209,7 @@ class HongbaoBase extends BaseAblStep implements RedEnv.RedEnvFunc, RedEnv.TimeF
|
|||||||
if (child2 != null) {
|
if (child2 != null) {
|
||||||
child2.getBoundsInScreen(rect);
|
child2.getBoundsInScreen(rect);
|
||||||
if (rect.top >= 2092 && rect.bottom <= 2151 && rect.left >= 800) {
|
if (rect.top >= 2092 && rect.bottom <= 2151 && rect.left >= 800) {
|
||||||
Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child2.getContentDescription());
|
// Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child2.getContentDescription());
|
||||||
if ("android.widget.TextView".equals(child2.getClassName())) {
|
if ("android.widget.TextView".equals(child2.getClassName())) {
|
||||||
if (child2.getText() != null) {
|
if (child2.getText() != null) {
|
||||||
String s = child2.getText().toString();
|
String s = child2.getText().toString();
|
||||||
|
|||||||
@@ -16,8 +16,11 @@ import com.fisherbone.fuzhu.abllib.BaseAblStep;
|
|||||||
import com.fisherbone.fuzhu.abllib.utils.AblViewUtil;
|
import com.fisherbone.fuzhu.abllib.utils.AblViewUtil;
|
||||||
import com.fisherbone.fuzhu.db.DouyinBean;
|
import com.fisherbone.fuzhu.db.DouyinBean;
|
||||||
import com.fisherbone.fuzhu.entity.LiveBean;
|
import com.fisherbone.fuzhu.entity.LiveBean;
|
||||||
|
import com.fisherbone.fuzhu.entity.LiwuBean;
|
||||||
|
import com.fisherbone.fuzhu.entity.RedEnvBean;
|
||||||
import com.fisherbone.fuzhu.utils.EmojiFilter;
|
import com.fisherbone.fuzhu.utils.EmojiFilter;
|
||||||
import com.fisherbone.fuzhu.utils.ProfileSpUtils;
|
import com.fisherbone.fuzhu.utils.ProfileSpUtils;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -29,128 +32,37 @@ public class TestAblStep0 extends BaseAblStep {
|
|||||||
private String substring = "1000000";//当前的关注数
|
private String substring = "1000000";//当前的关注数
|
||||||
public String IFCONTIAN = "x";
|
public String IFCONTIAN = "x";
|
||||||
private int liwusubstring;
|
private int liwusubstring;
|
||||||
|
private RedEnvBean redEnvBean;
|
||||||
@Override
|
@Override
|
||||||
public void onStep(int step, Message msg) {
|
public void onStep(int step, Message msg) {
|
||||||
switch (step) {
|
switch (step) {
|
||||||
case AblSteps.STEP_1:
|
case AblSteps.STEP_1:
|
||||||
AblViewUtil.startApplication();
|
AblViewUtil.startApplication();
|
||||||
AblStepHandler.sendMsg(AblSteps.STEP_2);
|
AblStepHandler.sendMsg(AblSteps.STEP_2);
|
||||||
|
redEnvBean = ProfileSpUtils.getInstance().getRedEnvBean();
|
||||||
break;
|
break;
|
||||||
case AblSteps.STEP_2:
|
case AblSteps.STEP_2:
|
||||||
AblViewUtil.mySleep(5);
|
AblViewUtil.mySleep(5);
|
||||||
// getNodeInfoh();
|
// getNodeInfoh();
|
||||||
// LiveBean liveBean1 = ProfileSpUtils.getInstance().getLiveBean();
|
|
||||||
// String liwunum = liveBean1.getLiwucishu();
|
|
||||||
// int fastnum = Integer.valueOf(liwunum);
|
|
||||||
// faliwu("大啤酒",2,fastnum);
|
|
||||||
|
|
||||||
|
|
||||||
getdoubsi();
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getdoubsi() {
|
|
||||||
int doubinum = 0;
|
|
||||||
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
|
||||||
for (int i = 0; i < root.getChildCount(); i++) {
|
|
||||||
AccessibilityNodeInfo child = root.getChild(i);
|
|
||||||
// Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
|
||||||
for (int y = 0; y < child.getChildCount(); y++) {
|
|
||||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
|
||||||
// Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
|
||||||
for (int j = 0; j < child1.getChildCount(); j++) {
|
|
||||||
AccessibilityNodeInfo child2 = child1.getChild(j);
|
|
||||||
Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child1.getContentDescription());
|
|
||||||
Rect rect = new Rect();
|
|
||||||
child2.getBoundsInScreen(rect);
|
|
||||||
if (rect.top >= 2092 && rect.bottom <= 2151) {
|
|
||||||
if ("android.widget.TextView".equals(child2.getClassName())) {
|
|
||||||
//(928,2092),(981,2151)
|
|
||||||
if (child2.getText() != null) {
|
|
||||||
String doubi = child2.getText().toString();
|
|
||||||
Log.e("TIAOSHI###", "----抖币数:" + doubi);
|
|
||||||
doubinum = Integer.valueOf(doubi);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return doubinum;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 发送礼物
|
|
||||||
* @param str 礼物名称
|
|
||||||
* @param danjia 单价
|
|
||||||
* @param fastnum 发送个数
|
|
||||||
*/
|
|
||||||
private void faliwu(String str,int danjia,int fastnum) {
|
|
||||||
AblViewUtil.mySleep(2);
|
|
||||||
int getdoubi = getdoubi();
|
|
||||||
|
|
||||||
int fastdoubi = fastnum * danjia;
|
|
||||||
if (getdoubi >= fastdoubi) {
|
|
||||||
} else {
|
|
||||||
fastdoubi = getdoubi;
|
|
||||||
}
|
|
||||||
//点开礼物
|
//点开礼物
|
||||||
clickmoreli();
|
clickmoreli();
|
||||||
|
Log.e("TIAOSHI###", "打开礼物");
|
||||||
AblViewUtil.mySleep(1);
|
AblViewUtil.mySleep(1);
|
||||||
//点击背包
|
int doubinum = dangqianDoubi();
|
||||||
|
Log.e("TIAOSHI###当前抖币数",doubinum+"");
|
||||||
|
AblViewUtil.mySleep(2);
|
||||||
clickmenu("5");
|
clickmenu("5");
|
||||||
|
AblViewUtil.mySleep(2);
|
||||||
|
int geliwu = geliwu("");
|
||||||
|
Log.e("TIAOSHI###背包里的抖币数",geliwu+"");
|
||||||
|
redEnvBean.setLivedoubinumfir(doubinum + geliwu + "");
|
||||||
|
Log.e("TIAOSHI###", "初始抖币数" + redEnvBean.getLivedoubinumfir());
|
||||||
AblViewUtil.mySleep(1);
|
AblViewUtil.mySleep(1);
|
||||||
//点击礼物
|
AblViewUtil.back();
|
||||||
clickmenu("1");
|
default:
|
||||||
AblViewUtil.mySleep(1);
|
|
||||||
AccessibilityNodeInfo hognbaonode = geliwu(str).get(0);
|
|
||||||
double num = fastdoubi / danjia;
|
|
||||||
int intnum = new Double(num).intValue();
|
|
||||||
if (intnum > 0) {
|
|
||||||
for (int i = 0; i <= intnum; i++) {
|
|
||||||
AblViewUtil.mySleep(1);
|
|
||||||
clickcommonthree(hognbaonode, "");
|
|
||||||
Log.e("TIAOSHI###", "发礼物的循环次数"+i);
|
|
||||||
String liwutime = ProfileSpUtils.getInstance().getLiveBean().getLiwutime();
|
|
||||||
int jiangetime = Integer.valueOf(liwutime);
|
|
||||||
AblViewUtil.mySleep(jiangetime);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Log.e("TIAOSHI###", "发礼物的抖币不够了");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 获得抖币
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private int getdoubi() {
|
|
||||||
int doubinum = 0;
|
|
||||||
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
|
||||||
for (int i = 0; i < root.getChildCount(); i++) {
|
|
||||||
AccessibilityNodeInfo child = root.getChild(i);
|
|
||||||
// Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
|
||||||
for (int y = 0; y < child.getChildCount(); y++) {
|
|
||||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
|
||||||
// Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
|
||||||
for (int j = 0; j < child1.getChildCount(); j++) {
|
|
||||||
AccessibilityNodeInfo child2 = child1.getChild(j);
|
|
||||||
Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child1.getContentDescription());
|
|
||||||
if ("android.widget.TextView".equals(child2.getClassName())) {
|
|
||||||
if (child2.getText() != null) {
|
|
||||||
String doubi = child2.getText().toString();
|
|
||||||
Log.e("TIAOSHI###", "----抖币数:" + doubi);
|
|
||||||
doubinum = Integer.valueOf(doubi);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return doubinum;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -166,8 +78,8 @@ public class TestAblStep0 extends BaseAblStep {
|
|||||||
// Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
// Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
||||||
for (int y = 0; y < child.getChildCount(); y++) {
|
for (int y = 0; y < child.getChildCount(); y++) {
|
||||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
AccessibilityNodeInfo child1 = child.getChild(y);
|
||||||
Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
// Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
||||||
nodeZuobiao(child1);
|
// nodeZuobiao(child1);
|
||||||
if ("android.widget.RelativeLayout".equals(child1.getClassName())) {
|
if ("android.widget.RelativeLayout".equals(child1.getClassName())) {
|
||||||
if (child1.getContentDescription() != null) {
|
if (child1.getContentDescription() != null) {
|
||||||
if (child1.getContentDescription().equals("礼物")) {
|
if (child1.getContentDescription().equals("礼物")) {
|
||||||
@@ -175,71 +87,58 @@ public class TestAblStep0 extends BaseAblStep {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private ArrayList<AccessibilityNodeInfo> getrecyy() {
|
}
|
||||||
ArrayList<AccessibilityNodeInfo> objects = new ArrayList<>();
|
}
|
||||||
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
}
|
||||||
for (int i = 0; i < root.getChildCount(); i++) {
|
public int dangqianDoubi() {
|
||||||
AccessibilityNodeInfo child = root.getChild(i);
|
int doubinumr = 0;
|
||||||
Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
String getdoubinum = getdoubinum();
|
||||||
for (int y = 0; y < child.getChildCount(); y++) {
|
if (getdoubinum.equals("")) {
|
||||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
getdoubinum = "0";
|
||||||
Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
}
|
||||||
if ("androidx.recyclerview.widget.RecyclerView".equals(child1.getClassName())) {
|
if ("充值".equals(getdoubinum)) {
|
||||||
objects.add(child1);
|
doubinumr = 0;
|
||||||
}
|
} else {
|
||||||
}
|
doubinumr = Integer.valueOf(getdoubinum);
|
||||||
}
|
}
|
||||||
return objects;
|
return doubinumr;
|
||||||
}
|
}
|
||||||
|
public String getdoubinum() {
|
||||||
/**
|
String doubinum = "";
|
||||||
* 获得背包中第一个位置的了礼物
|
|
||||||
*/
|
|
||||||
private List<AccessibilityNodeInfo> geliwu(String text) {
|
|
||||||
List<AccessibilityNodeInfo> liwus = new ArrayList<>();
|
|
||||||
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
||||||
|
if (root != null) {
|
||||||
for (int i = 0; i < root.getChildCount(); i++) {
|
for (int i = 0; i < root.getChildCount(); i++) {
|
||||||
AccessibilityNodeInfo child = root.getChild(i);
|
AccessibilityNodeInfo child = root.getChild(i);
|
||||||
|
// Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
||||||
|
//nodeZuobiao(child);
|
||||||
for (int y = 0; y < child.getChildCount(); y++) {
|
for (int y = 0; y < child.getChildCount(); y++) {
|
||||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
AccessibilityNodeInfo child1 = child.getChild(y);
|
||||||
|
// Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
||||||
|
//nodeZuobiao(child1);
|
||||||
for (int j = 0; j < child1.getChildCount(); j++) {
|
for (int j = 0; j < child1.getChildCount(); j++) {
|
||||||
AccessibilityNodeInfo child2 = child1.getChild(j);
|
AccessibilityNodeInfo child2 = child1.getChild(j);
|
||||||
|
|
||||||
Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child1.getContentDescription());
|
|
||||||
for (int x = 0; x < child2.getChildCount(); x++) {
|
|
||||||
AccessibilityNodeInfo child3 = child2.getChild(x);
|
|
||||||
Log.e("TIAOSHI###", "----fourNode:" + child3.getClassName() + ":" + child3.getText() + ":" + child1.getContentDescription());
|
|
||||||
if (child3.getText() != null) {
|
|
||||||
if (text.equals(child3.getText().toString())) {
|
|
||||||
liwus.add(child2);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return liwus;
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.N)
|
|
||||||
public void clickcommonthree(AccessibilityNodeInfo accessibilityNodeInfo, String s) {
|
|
||||||
if (accessibilityNodeInfo != null) {
|
|
||||||
Rect rect = new Rect();
|
Rect rect = new Rect();
|
||||||
accessibilityNodeInfo.getBoundsInScreen(rect);
|
if (child2 != null) {
|
||||||
AblService.getInstance().clickPoint((rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2, 300);
|
child2.getBoundsInScreen(rect);
|
||||||
Log.e("TIAOSHI###", "点击" + s + "按钮");
|
if (rect.top >= 2092 && rect.bottom <= 2151 && rect.left >= 800) {
|
||||||
Log.e("TIAOSHI###", "点击" + s + "按钮" + "(" + (rect.left + rect.right) / 2 + "," + (rect.top + rect.bottom) / 2 + ")");
|
// Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child2.getContentDescription());
|
||||||
} else {
|
if ("android.widget.TextView".equals(child2.getClassName())) {
|
||||||
Log.e("TIAOSHI###", "没有找到" + s + "按钮");
|
if (child2.getText() != null) {
|
||||||
|
String s = child2.getText().toString();
|
||||||
|
doubinum = s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return doubinum;
|
||||||
|
}
|
||||||
|
return "0";
|
||||||
|
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 点击礼物下面的菜单
|
* 点击礼物下面的菜单
|
||||||
* 1.礼物
|
* 1.礼物
|
||||||
@@ -256,10 +155,10 @@ public class TestAblStep0 extends BaseAblStep {
|
|||||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
AccessibilityNodeInfo child1 = child.getChild(y);
|
||||||
for (int j = 0; j < child1.getChildCount(); j++) {
|
for (int j = 0; j < child1.getChildCount(); j++) {
|
||||||
AccessibilityNodeInfo child2 = child1.getChild(j);
|
AccessibilityNodeInfo child2 = child1.getChild(j);
|
||||||
Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child1.getContentDescription());
|
// Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child1.getContentDescription());
|
||||||
for (int x = 0; x < child2.getChildCount(); x++) {
|
for (int x = 0; x < child2.getChildCount(); x++) {
|
||||||
AccessibilityNodeInfo child3 = child2.getChild(x);
|
AccessibilityNodeInfo child3 = child2.getChild(x);
|
||||||
Log.e("TIAOSHI###", "----fourNode:" + child3.getClassName() + ":" + child3.getText() + ":" + child1.getContentDescription());
|
// Log.e("TIAOSHI###", "----fourNode:" + child3.getClassName() + ":" + child3.getText() + ":" + child1.getContentDescription());
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "1"://礼物
|
case "1"://礼物
|
||||||
if ("android.widget.TextView".equals(child3.getClassName())) {
|
if ("android.widget.TextView".equals(child3.getClassName())) {
|
||||||
@@ -304,8 +203,117 @@ public class TestAblStep0 extends BaseAblStep {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 获得背包中第一排位置的了礼物
|
||||||
|
*/
|
||||||
|
private int geliwu(String text) {
|
||||||
|
int doubiNum = 0;
|
||||||
|
ArrayList<LiwuBean> liwuBeans = new ArrayList<>();
|
||||||
|
ArrayList<AccessibilityNodeInfo> oneInfos = new ArrayList<>();
|
||||||
|
ArrayList<AccessibilityNodeInfo> twoInfos = new ArrayList<>();
|
||||||
|
ArrayList<AccessibilityNodeInfo> threeInfos = new ArrayList<>();
|
||||||
|
ArrayList<AccessibilityNodeInfo> fourInfos = new ArrayList<>();
|
||||||
|
|
||||||
|
AccessibilityNodeInfo root = AblService.getInstance().getRootInActiveWindow();
|
||||||
|
for (int i = 0; i < root.getChildCount(); i++) {
|
||||||
|
AccessibilityNodeInfo child = root.getChild(i);
|
||||||
|
// Log.e("TIAOSHI###", "----oneNode:" + child.getClassName() + ":" + child.getText() + ":" + child.getContentDescription());
|
||||||
|
// nodeZuobiao(child);
|
||||||
|
for (int y = 0; y < child.getChildCount(); y++) {
|
||||||
|
AccessibilityNodeInfo child1 = child.getChild(y);
|
||||||
|
// Log.e("TIAOSHI###", "----twoNode:" + child1.getClassName() + ":" + child1.getText() + ":" + child1.getContentDescription());
|
||||||
|
// nodeZuobiao(child1);
|
||||||
|
for (int j = 0; j < child1.getChildCount(); j++) {
|
||||||
|
AccessibilityNodeInfo child2 = child1.getChild(j);
|
||||||
|
// Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child2.getContentDescription());
|
||||||
|
// nodeZuobiao(child2);
|
||||||
|
for (int x = 0; x < child2.getChildCount(); x++) {
|
||||||
|
AccessibilityNodeInfo child3 = child2.getChild(x);
|
||||||
|
// Log.e("TIAOSHI###", "----fourNode:" + child3.getClassName() + ":" + child3.getText() + ":" + child3.getContentDescription());
|
||||||
|
// nodeZuobiao(child3);
|
||||||
|
|
||||||
|
Rect rect = new Rect();
|
||||||
|
child3.getBoundsInScreen(rect);
|
||||||
|
if (rect.top >= 1438 && rect.bottom <= 1698 && rect.left >= 30 && rect.right <= 248) {
|
||||||
|
|
||||||
|
Log.e("TIAOSHI###", "----fourNode:" + child3.getClassName() + ":" + child3.getText() + ":" + child3.getContentDescription());
|
||||||
|
nodeZuobiao(child3);
|
||||||
|
oneInfos.add(child3);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (rect.top >= 1438 && rect.bottom <= 1698 && rect.left >= 248 && rect.right <= 540) {
|
||||||
|
|
||||||
|
Log.e("TIAOSHI###", "----fourNodetwo:" + child3.getClassName() + ":" + child3.getText() + ":" + child3.getContentDescription());
|
||||||
|
nodeZuobiao(child3);
|
||||||
|
twoInfos.add(child3);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (rect.top >= 1438 && rect.bottom <= 1698 && rect.left >= 540 && rect.right <= 810) {
|
||||||
|
|
||||||
|
Log.e("TIAOSHI###", "----fourNodehree:" + child3.getClassName() + ":" + child3.getText() + ":" + child3.getContentDescription());
|
||||||
|
nodeZuobiao(child3);
|
||||||
|
threeInfos.add(child3);
|
||||||
|
|
||||||
|
}
|
||||||
|
if (rect.top >= 1438 && rect.bottom <= 1698 && rect.left >= 810 && rect.right <= 1080) {
|
||||||
|
|
||||||
|
Log.e("TIAOSHI###", "----fourNodefour:" + child3.getClassName() + ":" + child3.getText() + ":" + child3.getContentDescription());
|
||||||
|
nodeZuobiao(child3);
|
||||||
|
fourInfos.add(child3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
addLiwuData(liwuBeans, oneInfos);
|
||||||
|
addLiwuData(liwuBeans, twoInfos);
|
||||||
|
addLiwuData(liwuBeans, threeInfos);
|
||||||
|
addLiwuData(liwuBeans, fourInfos);
|
||||||
|
Gson gson = new Gson();
|
||||||
|
String s1 = gson.toJson(liwuBeans);
|
||||||
|
Log.e("礼物的字符串", s1);//[{"login_status":"1","short_id":"xiao629972576","short_name":""}]
|
||||||
|
for(int j=0;j<liwuBeans.size();j++){
|
||||||
|
LiwuBean liwuBean = liwuBeans.get(j);
|
||||||
|
String liwuDoubi = liwuBean.getLiwuDoubi();
|
||||||
|
int integer = Integer.valueOf(liwuDoubi);
|
||||||
|
doubiNum = integer+doubiNum;
|
||||||
|
}
|
||||||
|
return doubiNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addLiwuData(ArrayList<LiwuBean> liwuBeans, ArrayList<AccessibilityNodeInfo> oneInfos) {
|
||||||
|
LiwuBean liwuBean = new LiwuBean();
|
||||||
|
if (oneInfos.size() > 0) {
|
||||||
|
String s0 = oneInfos.get(0).getText().toString();
|
||||||
|
liwuBean.setLiwuTime(s0);
|
||||||
|
String s1 = oneInfos.get(1).getText().toString();
|
||||||
|
liwuBean.setLiwuName(s1);
|
||||||
|
// String s2 = oneInfos.get(2).getText().toString();
|
||||||
|
if(s1.equals("大啤酒")) {
|
||||||
|
liwuBean.setLiwuDanjia("2");
|
||||||
|
}else if(s1.equals("小心心")){
|
||||||
|
liwuBean.setLiwuDanjia("1");
|
||||||
|
}else if(s1.equals("棒棒糖")){
|
||||||
|
liwuBean.setLiwuDanjia("9");
|
||||||
|
}else if(s1.equals("玫瑰")){
|
||||||
|
liwuBean.setLiwuDanjia("1");
|
||||||
|
}else {
|
||||||
|
liwuBean.setLiwuDanjia("0");
|
||||||
|
}
|
||||||
|
String s3 = oneInfos.get(3).getText().toString();
|
||||||
|
if (s3.contains(IFCONTIAN)) {
|
||||||
|
String substring = s3.substring(1);
|
||||||
|
liwusubstring = Integer.valueOf(substring);
|
||||||
|
Log.e("TIAOSHI###", "----礼物个数=:" + substring);
|
||||||
|
}
|
||||||
|
liwuBean.setLiwuNum(liwusubstring+"");
|
||||||
|
String liwuDanjia = liwuBean.getLiwuDanjia();
|
||||||
|
int danjia = Integer.valueOf(liwuDanjia);
|
||||||
|
liwuBean.setLiwuDoubi(liwusubstring*danjia+"");
|
||||||
|
liwuBeans.add(liwuBean);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -179,13 +179,16 @@ public class TestAblStep34 extends HongbaoBase implements RedEnv.RedEnvFunc, Red
|
|||||||
Log.e("TIAOSHI###", "打开礼物");
|
Log.e("TIAOSHI###", "打开礼物");
|
||||||
AblViewUtil.mySleep(1);
|
AblViewUtil.mySleep(1);
|
||||||
int doubinum = dangqianDoubi();
|
int doubinum = dangqianDoubi();
|
||||||
|
Log.e("TIAOSHI###当前抖币数",doubinum+"");
|
||||||
|
AblViewUtil.mySleep(2);
|
||||||
clickmenu("5");
|
clickmenu("5");
|
||||||
AblViewUtil.mySleep(1);
|
AblViewUtil.mySleep(2);
|
||||||
int geliwu = geliwu("");
|
int geliwu = geliwu("");
|
||||||
Log.e("背包里的抖币数",geliwu+"");
|
Log.e("TIAOSHI###背包里的抖币数",geliwu+"");
|
||||||
redEnvBean.setLivedoubinumfir(doubinum + geliwu + "");
|
redEnvBean.setLivedoubinumfir(doubinum + geliwu + "");
|
||||||
Log.e("TIAOSHI###", "初始抖币数" + redEnvBean.getLivedoubinumfir());
|
Log.e("TIAOSHI###", "初始抖币数" + redEnvBean.getLivedoubinumfir());
|
||||||
taskDbTj("0" + "", redEnvBean.getLivedoubinumfir());
|
taskDbTj("0" + "", redEnvBean.getLivedoubinumfir());
|
||||||
|
AblViewUtil.mySleep(1);
|
||||||
AblViewUtil.back();
|
AblViewUtil.back();
|
||||||
tagControlView("", livePosition);
|
tagControlView("", livePosition);
|
||||||
AblStepHandler.sendMsg(AblSteps.STEP_254);
|
AblStepHandler.sendMsg(AblSteps.STEP_254);
|
||||||
@@ -927,10 +930,10 @@ public class TestAblStep34 extends HongbaoBase implements RedEnv.RedEnvFunc, Red
|
|||||||
AccessibilityNodeInfo child1 = child.getChild(y);
|
AccessibilityNodeInfo child1 = child.getChild(y);
|
||||||
for (int j = 0; j < child1.getChildCount(); j++) {
|
for (int j = 0; j < child1.getChildCount(); j++) {
|
||||||
AccessibilityNodeInfo child2 = child1.getChild(j);
|
AccessibilityNodeInfo child2 = child1.getChild(j);
|
||||||
Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child1.getContentDescription());
|
// Log.e("TIAOSHI###", "----threeNode:" + child2.getClassName() + ":" + child2.getText() + ":" + child1.getContentDescription());
|
||||||
for (int x = 0; x < child2.getChildCount(); x++) {
|
for (int x = 0; x < child2.getChildCount(); x++) {
|
||||||
AccessibilityNodeInfo child3 = child2.getChild(x);
|
AccessibilityNodeInfo child3 = child2.getChild(x);
|
||||||
Log.e("TIAOSHI###", "----fourNode:" + child3.getClassName() + ":" + child3.getText() + ":" + child1.getContentDescription());
|
// Log.e("TIAOSHI###", "----fourNode:" + child3.getClassName() + ":" + child3.getText() + ":" + child1.getContentDescription());
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "1"://礼物
|
case "1"://礼物
|
||||||
if ("android.widget.TextView".equals(child3.getClassName())) {
|
if ("android.widget.TextView".equals(child3.getClassName())) {
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ ext {
|
|||||||
applicationId : "com.fisherbone.fuzhu",
|
applicationId : "com.fisherbone.fuzhu",
|
||||||
minSdkVersion : 24,
|
minSdkVersion : 24,
|
||||||
targetSdkVersion : 29,
|
targetSdkVersion : 29,
|
||||||
versionCode : 175,
|
versionCode : 176,
|
||||||
versionName : "1.7.5",
|
versionName : "1.7.6",
|
||||||
testInstrumentationRunner: "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner: "androidx.test.runner.AndroidJUnitRunner"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user