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

selenium 定位问题求助

  •  
  •   luyg · 2016-04-11 18:36:34 +08:00 · 2114 次点击
    这是一个创建于 2930 天前的主题,其中的信息可能已经有所发展或是发生改变。

    各位大神: 最近在学习 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 条回复    2016-04-11 18:38:26 +08:00
    luyg
        1
    luyg  
    OP
       2016-04-11 18:38:26 +08:00
    因为不太会传图片,文字看上去比较乱。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2754 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 12:59 · PVG 20:59 · LAX 05:59 · JFK 08:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.