首页 > python版的selenium给页面写入js,window.location.reload()提错?

python版的selenium给页面写入js,window.location.reload()提错?

目前浏览器是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代码可以在页面执行。
可是为什么第二条代码不行呢,缺少了什么呀

你好你要做刷新页面时吧,我想说的你上面的那个写法不是全兼容的 。

兼容的写法是这样的:

window.history.go(0);
【热门文章】
【热门文章】