推荐学习书目
› 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
old18
V2EX  ›  Python

selenium 点击的问题.请各位大佬指教一下.

  •  
  •   old18 · Apr 25, 2019 · 2934 views
    This topic created in 2711 days ago, the information mentioned may be changed or developed.
    "<div>
    <p>
    我已阅读并同意
    <a href="javascript:void(0)">xxx 协议</a>
    </p>
    </div>"

    click()和鼠标点击都用了
    点了就直接跳进协议里了. 然后前面小方框没有勾选上

    求各位大佬给个思路
    3 replies  •  2019-04-30 11:30:36 +08:00
    testlover
        1
    testlover  
       Apr 25, 2019
    checkbox 和 a 标签这是俩控件啊 你得操作前面的 checkbox 不能操作 a 标签啊
    crazypig14
        2
    crazypig14  
       Apr 25, 2019
    从 console 代码里用 js 实现点击,再把 js 搬到 python 里
    ccdrea
        3
    ccdrea  
       Apr 30, 2019
    self.broswer.execute_script("arguments[0].click();",checkbox )
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2487 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 10:46 · PVG 18:46 · LAX 03:46 · JFK 06:46
    ♥ Do have faith in what you're doing.