目前浏览器是ubuntu下的firefox
是在python版的selenium给firefox页面写入js代码
由于要跑一个小脚本,浏览器测试之类的,因为对js不太明白
下面是selenium的doc
https://code.google.com/p/selenium/
1
$("html, body").animate({ scrollTop: $(document).height() }, "fast");
2
window.location.reload()
第一条js代码可以在页面执行。
可是为什么第二条代码不行呢,缺少了什么呀
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你好你要做刷新页面时吧,我想说的你上面的那个写法不是全兼容的 。
兼容的写法是这样的: