当我在终端中进行查询时,例如查询“* id:'btn_addRemove'”
然后我得到一个输出
[0] {
"id" => "btn_addRemove",
"enabled" => true,
"contentDescription" => nil,
"class" => "android.widget.ImageView",
"rect" => {
"center_y" => 353,
"center_x" => 622,
"height" => 120,
"y" => 293,
"width" => 140,
"x" => 552
},
"tag" => nil,
"description" => "android.widget.ImageView{4307ec68 V.ED..C. ........ 552,35-692,155 #7f06006e app:id/btn_addRemove}"
},
[1] {
"id" => "btn_addRemove",
"enabled" => true,
"contentDescription" => nil,
"class" => "android.widget.ImageView",
"rect" => {
"center_y" => 559,
"center_x" => 622,
"height" => 120,
"y" => 499,
"width" => 140,
"x" => 552
},
"tag" => nil,
"description" => "android.widget.ImageView{430557b8 V.ED..C. ........ 552,35-692,155 #7f06006e app:id/btn_addRemove}"
},
现在的问题是两个按钮的“id”是相同的,当我点击按钮时,它会变成绿色,里面有一些图像,当我再次点击时,按钮变成之前显示的正常按钮。
我如何验证这一点?