先快后慢拖动鼠标
Actions action = new Actions(driver);
long d1 = Math.round(xDis*0.8);
long d2 = Math.round(xDis*0.1);
long d3 = Math.round(xDis*0.1);
action.moveByOffset((int)d1, 1);
Thread.sleep(new Random().nextInt(100) + 150);
action.moveByOffset((int)d2, 1);
Thread.sleep(new Random().nextInt(100) + 150);
action.moveByOffset((int)d3, 1);
action.moveByOffset(baseDis, 1);
Thread.sleep(2000);
action.release(element);
Action actions = action.build();
actions.perform();
代码详见:https://github.com/wxmgcs/selenium-geetest-crack.git
参考资料:
https://github.com/wycm/selenium-geetest-crack.git
https://blog.youkuaiyun.com/mtchy/article/details/53507762
http://jiyandoc.c2567.com/