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

selenium 定位问题求助

  •  
  •   luyg · Apr 11, 2016 · 2958 views
    This topic created in 3710 days ago, the information mentioned may be changed or developed.

    各位大神: 最近在学习 selenium ,然后发现了一个问题,一直没法解决 定位的页面源码如下:

    <body> <table class="public-top-table" cellspacing="0" cellpadding="0"> <tbody> <tr class="top-tr-lv1"> <td> <table class="top-tr-lv1-table" cellspacing="0" cellpadding="0"> <tbody> <tr align="center" class="bold12-font"> <td width="50" class="top-lv1-btnTd">   </td> <td width="70" class="top-lv1-ckBtnTd" onmouseout="moveout_lv1_btn(this)" onmousemove="move_lv1_btn(this)" onclick="top_lv1_ck(),top_one_lv('/aim/framePages/sso/portal_frame.jsp')" isck="true">
    桌 面
    </td> <td width="60" class="top-lv1-btnTd" onmouseout="moveout_lv1_btn(this)" onmousemove="move_lv1_btn(this)" onclick="top_lv1_ck(),top_one_lv('/aim/batch/index_batch.jsp')">
    批操作
    </td> <td width="60" class="top-lv1-btnTd" onmouseout="moveout_lv1_btn(this)" onmousemove="move_lv1_btn(this)" onclick="top_lv1_ck(),top_one_lv('/aim/framePages/middle_frame.jsp')">
    元目录
    </td> <td width="75" class="top-lv1-btnTd" onmouseout="moveout_lv1_btn(this)" onmousemove="move_lv1_btn(this)" onclick="top_lv1_ck(),top_one_lv('/aim/framePages/sys/middle_frame.jsp')">
    配置管理
    </td> <td width="75" class="top-lv1-btnTd" onmouseout="moveout_lv1_btn(this)" onmousemove="move_lv1_btn(this)" onclick="top_lv1_ck(),top_one_lv('/aim/framePages/report/middle_frame.jsp')">
    审计报表
    </td> <td class="top-lv1-btnTd">   </td>

    ==================================

    最终实际的定位就是这个位置:

    <td width="60" class="top-lv1-btnTd" onmouseout="moveout_lv1_btn(this)" onmousemove="move_lv1_btn(this)" onclick="top_lv1_ck(),top_one_lv('/aim/framePages/middle_frame.jsp')">
    元目录
    </td>

    其实就是想点击元目录这个菜单。求大神帮助

    1 replies    2016-04-11 18:38:26 +08:00
    luyg
        1
    luyg  
    OP
       Apr 11, 2016
    因为不太会传图片,文字看上去比较乱。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1081 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 22:47 · PVG 06:47 · LAX 15:47 · JFK 18:47
    ♥ Do have faith in what you're doing.