-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
又“徐特立”了 #72
Comments
测试了一下,只有每日答题的填空题有问题,表现为获取不到题目,其他功能正常 |
function getFitbQuestion() { 在function getFitbQuestion() 加一个.parent()可以获取题目, |
我试了试,用childCount()方法来获取子控件的数量(比实际的多1) 然后那段for循环看的有点蒙,就瞎改了一下 改完测试一下完美运行 function getFitbQuestion() {
var questionCollections = className("EditText").findOnce().parent().parent();
var questionArray = [];
var findBlank = false;
var blankCount = 0;
var blankNumStr = "";
var i = 0;
questionCollections.children().forEach(item => {
if (item.className() != "android.widget.EditText") {
if (item.text() != "") {//题目段
if (findBlank) {
blankNumStr = "|" + blankCount.toString();
questionArray.push(blankNumStr);
findBlank = false;
}
questionArray.push(item.text());
}
else {
findBlank = true;
blankCount = (className("EditText").findOnce(i).parent().childCount() - 1);
i++;
}
}
});
return questionArray;
} |
我的理解是 |
@xiaodiaoz 因为用childCount()获取到的子控件的数量比实际的格数多一,但是我有点不明白为什么(菜) 看了一下布局,应该不能答那种双填空的题(还是菜)不过我答了半天没有找到双填空 |
EditText和其他空格在同一层 indexInParent值为0,而其他四个空格 classname是view. View indexInParent 依次是 1234所以要减一 |
可以,能用 |
太屌了,完美解决 |
调试一天,没解决,大佬厉害,秒了徐特立 |
每日答题网页版可以写个JavaScript脚本吗 |
我上次瞅了一眼,找不到提示里的答案在哪 |
用python开了个头,然后发现网页版没有挑战答题,所以暂时鸽了(真的只写了一点点,获取题目都没动) |
每日答题,徐特立 |
我找不到提示里的答案。。。 这就比较尴尬了,所以这个就放那了 |
看来网页版的难度不小噢 |
是否能更新一下题库。谢谢
The text was updated successfully, but these errors were encountered: