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
xuegj1010
V2EX  ›  Python

Python +selenium 操作 ie 浏览器 send_keys 的时候很慢

  •  1
     
  •   xuegj1010 · 2018-05-18 15:25:20 +08:00 · 2834 次点击
    这是一个创建于 2172 天前的主题,其中的信息可能已经有所发展或是发生改变。

    iedriver 是 32 位的,正常运行很快,但是用 pycharm 调试的时候就变得非常慢,我知道 64 位的 iedriver 有这个 bug,但是我用的是 32 位的,之前一直是挺好的,但是今天正常运行也是正常的,但是开 debug 模式就会很慢,不知道有没有大神遇到过这个情况

    3 条回复    2018-05-21 21:18:07 +08:00
    chesterzzy
        1
    chesterzzy  
       2018-05-18 16:29:36 +08:00
    都开了 debug 模式了,再加上 pycharm 在里面搞事情,慢点也正常啊。不知道楼主在纠结什么?正常运行反正不会在 pycharm 里跑,也不会 debug 模式跑啊
    ml1344677
        2
    ml1344677  
       2018-05-18 17:20:00 +08:00
    确定是 send_key 慢?没有使用过 IE,但是印象里 send_key 应该是很快的,尝试下关闭图片加载和 CSS 加载试试
    xuegj1010
        3
    xuegj1010  
    OP
       2018-05-21 21:18:07 +08:00
    找到原因了,前一次运行之后 iedriver 没有结束,导致下次运行又启动了一个 iedriver,结果很慢。。。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5397 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 08:32 · PVG 16:32 · LAX 01:32 · JFK 04:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.