TA的每日心情 | 无聊 4 天前 |
---|
签到天数: 530 天 连续签到: 2 天 [LV.9]测试副司令
|
1测试积点
python爬虫中使用selenium browser.execute_script('window.scrollTo(0,document.body.scrollHeight)')报错- Traceback (most recent call last):
- File "D:\PracticePython\爬虫demo1\demo2.py\jdtest.py", line 134, in
- main()
- File "D:\PracticePython\爬虫demo1\demo2.py\jdtest.py", line 131, in main
- next_page(i)
- File "D:\PracticePython\爬虫demo1\demo2.py\jdtest.py", line 98, in next_page
- browser.execute_script('window.scrollTo(0,document.body.scrollHeight)')
- File "D:\python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 879, in execute_script
- return self.execute(command, {
- File "D:\python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 425, in execute
- self.error_handler.check_response(response)
- File "D:\python3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
- raise exception_class(message, screen, stacktrace)
- selenium.common.exceptions.WebDriverException: Message: Command not found: POST /session/0f98442a-8de6-4ec3-9d10-589c13f11d89/execute/sync
复制代码
|
|