Giter VIP home page Giter VIP logo

Comments (5)

Damages9 avatar Damages9 commented on July 20, 2024

目前使用了一下,在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.

Damages9 avatar Damages9 commented on July 20, 2024

似乎是验证码的输入产生了问题,识别有误(?)

from jiankangyizhan.

Damages9 avatar Damages9 commented on July 20, 2024

很抱歉连续发文,我检查了一下spider文件夹中的code.png
code
如上图所示,而screenshot.png如下图所示
screenshot
脚本的使用是否与浏览器的默认缩放有关呢?这种情况需要怎样修改能得到更好的结果呢?感谢

from jiankangyizhan.

01miaom avatar 01miaom commented on July 20, 2024

这可能和浏览器元素的定位方式有关,通过修改下列代码,可以调整图片截取范围。
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.

LukeTu avatar LukeTu commented on July 20, 2024

遇到了同样的问题,我在Win下的chrome运行,截取到了密码的位置;请问作者是在linux下运行的吗?

from jiankangyizhan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.