Skip to content

Instantly share code, notes, and snippets.

@robinfang
Created August 19, 2016 08:32
Show Gist options
  • Select an option

  • Save robinfang/cc1cfcbab999930effb4be11b41f9ade to your computer and use it in GitHub Desktop.

Select an option

Save robinfang/cc1cfcbab999930effb4be11b41f9ade to your computer and use it in GitHub Desktop.
电影测试自动拿50分
function f() {
var i = 0;
var l = document.querySelectorAll('ul#collection>li');
for(let element of l) {
if(element.style["display"] === "list-item") {
element.querySelector("div.answer[value='2']").click();
i++;
break;
}
}
console.log(i);
if(i === 0) {
clearInterval();
}
}
setInterval(f,1500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment