V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
18870715400
V2EX  ›  Python

关于 selenium 模块中的 send_keys 的问题

  •  
  •   18870715400 · 2020-08-21 14:39:02 +08:00 · 1335 次点击
    这是一个创建于 1365 天前的主题,其中的信息可能已经有所发展或是发生改变。
    这几天使用 send_keys 的时候有时候会出现输入的值不全的问题, 比如 123456 只输入了 12345, 应该如何解决这类问题呢?
    4 条回复    2020-08-21 15:19:22 +08:00
    musi
        1
    musi  
       2020-08-21 14:54:36 +08:00
    直接注入 js?用 js 操作 dom?
    chaogg
        2
    chaogg  
       2020-08-21 15:17:11 +08:00
    我也遇到过,应该是 bug 。直接使用执行 js 的方式写入吧
    18870715400
        3
    18870715400  
    OP
       2020-08-21 15:17:57 +08:00
    @musi 之前用的是 driver.find_element_by_id("xxx").send_keys("123456")这种有的时候会出现输入不全的问题, 现在正在使用 js 测试
    18870715400
        4
    18870715400  
    OP
       2020-08-21 15:19:22 +08:00
    @musi
    @chaogg 谢谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   933 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:32 · PVG 04:32 · LAX 13:32 · JFK 16:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.