UiObject aa = new UiObject(new UiSelector().descriptionStartsWith("练与测"));
System.out.println("practice---"+aa.exists());
UiObject a = new UiObject(new UiSelector().descriptionMatches("^(\u0041)*[\u4e00-\u9fa5]+"));
System.out.println("A---"+a.exists());
UiObject b = new UiObject(new UiSelector().descriptionMatches("^(\u0042)*[\u4e00-\u9fa5]+"));
System.out.println("B---"+b.exists());
UiObject c = new UiObject(new UiSelector().descriptionMatches("^(\u0042)*[\u4e00-\u9fa5]+"));
System.out.println("C---"+c.exists());
UiObject d = new UiObject(new UiSelector().descriptionMatches("^(\u0041)*[\u4e00-\u9fa5]+"));
System.out.println("D---"+d.exists());
if(a.exists() || b.exists() || c.exists() || d.exists()){
System.out.println("this is choose");
}else{
System.out.println("this is write");
}
以上ABCD,就是判断标准,暂时没有发现startwith正确使用方法,哪位大神如果知道,烦请告知一下。