auto_xuexiqiangguo icon indicating copy to clipboard operation
auto_xuexiqiangguo copied to clipboard

TypeError:Cannot Call method "text" of null错误

Open Yuan68 opened this issue 2 years ago • 0 comments

是专项答题到某一题时出现的,错误行数是加粗那行。text是否能读取到似乎挺玄学的,希望能增加通用的检测:读不到的时候就重试,感谢开发者的付出!

// 多选题是否全选 function is_select_all_choice() { // options数组:下标为i基数时对应着ABCD,下标为偶数时对应着选项i-1(ABCD)的数值 var options = className('android.view.View').depth(26).find(); // question是题目(专项答题是第4个,其他是第2个) var question = (className('android.view.View').depth(23).findOnce(1).text().length > 2) ? className('android.view.View').depth(23).findOnce(1).text() : className('android.view.View').depth(23).findOnce(3).text(); return options.length / 2 == (question.match(/\s+/g) || []).length; }

Yuan68 avatar Aug 09 '22 15:08 Yuan68