Comments (5)
目前使用了一下,在pycharm中进行断点运行,发生了报错,报错内容如下:
Traceback (most recent call last):
File "C:\Users\Administrator\PycharmProjects\pythonProject1\main.py", line 51, in
browser.find_element_by_xpath("//button[text()="確定"]").click()
File "C:\Users\Administrator\PycharmProjects\pythonProject1\venv\lib\site-packages\selenium\webdriver\remote\webelement.py", line 81, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Users\Administrator\PycharmProjects\pythonProject1\venv\lib\site-packages\selenium\webdriver\remote\webelement.py", line 710, in _execute
return self._parent.execute(command, params)
File "C:\Users\Administrator\PycharmProjects\pythonProject1\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 424, in execute
self.error_handler.check_response(response)
File "C:\Users\Administrator\PycharmProjects\pythonProject1\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 247, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
(Session info: chrome=98.0.4758.102)
Stacktrace:
Backtrace:
Ordinal0 [0x008A69A3+2582947]
Ordinal0 [0x0083A6D1+2139857]
Ordinal0 [0x00733960+1063264]
Ordinal0 [0x00760E4E+1248846]
Ordinal0 [0x00756B53+1207123]
Ordinal0 [0x0077854C+1344844]
Ordinal0 [0x00756524+1205540]
Ordinal0 [0x007786A4+1345188]
Ordinal0 [0x0078834A+1409866]
Ordinal0 [0x00778366+1344358]
Ordinal0 [0x00755176+1200502]
Ordinal0 [0x00756066+1204326]
GetHandleVerifier [0x00A4BE02+1675858]
GetHandleVerifier [0x00B0036C+2414524]
GetHandleVerifier [0x0093BB01+560977]
GetHandleVerifier [0x0093A8D3+556323]
Ordinal0 [0x0084020E+2163214]
Ordinal0 [0x00845078+2183288]
Ordinal0 [0x008451C0+2183616]
Ordinal0 [0x0084EE1C+2223644]
BaseThreadInitThunk [0x75B1FA29+25]
RtlGetAppContainerNamedObjectPath [0x77367A9E+286]
RtlGetAppContainerNamedObjectPath [0x77367A6E+238]
Process finished with exit code 1
from jiankangyizhan.
似乎是验证码的输入产生了问题,识别有误(?)
from jiankangyizhan.
很抱歉连续发文,我检查了一下spider文件夹中的code.png
如上图所示,而screenshot.png如下图所示
脚本的使用是否与浏览器的默认缩放有关呢?这种情况需要怎样修改能得到更好的结果呢?感谢
from jiankangyizhan.
这可能和浏览器元素的定位方式有关,通过修改下列代码,可以调整图片截取范围。
left = int(element.location['x'])
top = int(element.location['y'])
right = int(element.location['x'] + element.size['width'])
bottom = int(element.location['y'] + element.size['height'])
from jiankangyizhan.
遇到了同样的问题,我在Win下的chrome运行,截取到了密码的位置;请问作者是在linux下运行的吗?
from jiankangyizhan.
Related Issues (20)
- Traceback (most recent call last): File "main.py", line 65, in <module> timeArray=time.localtime(int(data[149:162])) OSError: [Errno 22] Invalid argument HOT 3
- 登录成功之后的弹出框 HOT 12
- 小白请教:请问如何配置使用? HOT 1
- 整个运行过程 HOT 32
- 运行后chrome自动关闭 HOT 8
- 有人用这个脚本抢到了吗 HOT 21
- 调用的时间和健康系统的时间是一致的吗 HOT 2
- 如何获取某一天进行抢票呢 HOT 2
- 截取验证码问题 HOT 1
- 预订确认页面验证码问题 HOT 3
- 程序到点打开网站那一刻由于请求量太大,都会打不开,能否改成多次请求? HOT 1
- 预约确认界面的验证方式已更改 HOT 1
- 我做了一个这个网站蹲票的程序,和你一样也是利用Selenium实现的~ HOT 3
- Chrome自动关闭 HOT 2
- ModuleNotFoundError: No module named 'requests' HOT 1
- 是否登入碼不能識別? HOT 14
- Chrome运行关闭! HOT 6
- 请问目前有没有金巴的? HOT 1
- 腾讯空间点选验证 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jiankangyizhan.