51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 1750|回复: 3
打印 上一主题 下一主题

求助webdriver比较有难度的问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2014-9-19 08:58:54 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
在学习webdriver过程中,用testlink做实验,在选择某个测试项目后,点击用例(如附图所示),用例不能用元素识别的方法来识别,目前想要对用例实现拖拽到对应的测试组件,请问如何解决?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

  • TA的每日心情
    无聊
    2016-6-22 17:31
  • 签到天数: 29 天

    连续签到: 1 天

    [LV.4]测试营长

    2#
    发表于 2014-9-19 14:00:31 | 只看该作者
    楼主用firebug 看看是什么元素,再决定如何处理
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    3#
     楼主| 发表于 2014-9-19 14:36:31 | 只看该作者
    firedebug抓到如下:
    <div id="tree_div" class=" x-panel x-tree" style="overflow:auto; height:100%;border:1px solid #c3daf9;">
    <div id="ext-gen13" class="x-panel-bwrap">
    <div id="ext-gen14" class="x-panel-body x-panel-body-noheader" style="overflow: auto;">
    <ul id="ext-gen15" class="x-tree-root-ct x-tree-arrows">
    <li class="x-tree-node">
    <div id="extdd-1" class="x-tree-node-el x-unselectable x-tree-node-expanded" unselectable="on" ext:tree-node-id="868603">
    <span class="x-tree-node-indent"></span>
    <img class="x-tree-ec-icon x-tree-elbow-end-minus" src="http://192.168.33.3/testlink/third_party/ext-js/images/default/s.gif" alt="">
    <img id="extdd-2" class="x-tree-node-icon" unselectable="on" src="http://192.168.33.3/testlink/third_party/ext-js/images/default/s.gif" alt="">
    <a class="x-tree-node-anchor" tabindex="1" href="javascript:EP(868603)" hidefocus="on">
    <span id="extdd-3" unselectable="on">JasonTian (423)</span>
    </a>
    </div>
    <ul id="ext-gen19" class="x-tree-node-ct" style="visibility: visible; position: static; left: auto; top: auto; z-index: auto;">
    <li class="x-tree-node">
    <div id="extdd-4" class="x-tree-node-el x-unselectable folder x-tree-node-expanded" unselectable="on" ext:tree-node-id="1031725">
    <span class="x-tree-node-indent">
    <img class="x-tree-icon" src="http://192.168.33.3/testlink/third_party/ext-js/images/default/s.gif" alt="">
    </span>
    <img class="x-tree-ec-icon x-tree-elbow-minus" src="http://192.168.33.3/testlink/third_party/ext-js/images/default/s.gif" alt="">
    <img id="extdd-5" class="x-tree-node-icon" unselectable="on" src="http://192.168.33.3/testlink/third_party/ext-js/images/default/s.gif" alt="">
    <a class="x-tree-node-anchor" tabindex="1" href="javascript:ETS(1031725)" hidefocus="on">
    <span id="extdd-6" unselectable="on">SuiteA (7)</span>
    </a>
    </div>
    <ul id="ext-gen22" class="x-tree-node-ct" style="visibility: visible; position: static; left: auto; top: auto; z-index: auto;">
    <li class="x-tree-node">
    <div id="extdd-10" class="x-tree-node-el x-unselectable folder x-tree-node-expanded x-tree-selected" unselectable="on" ext:tree-node-id="933691">
    <span class="x-tree-node-indent">
    <img class="x-tree-ec-icon x-tree-elbow-minus" src="http://192.168.33.3/testlink/third_party/ext-js/images/default/s.gif" alt="">
    <img id="extdd-11" class="x-tree-node-icon" unselectable="on" src="http://192.168.33.3/testlink/third_party/ext-js/images/default/s.gif" alt="">
    <a class="x-tree-node-anchor" tabindex="1" href="javascript:ETS(933691)" hidefocus="on">
    <span id="extdd-12" unselectable="on">Jason (3)</span>
    </a>
    </div>
    <ul id="ext-gen24" class="x-tree-node-ct" style="visibility: visible; position: static; left: auto; top: auto; z-index: auto;">
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2020-12-8 11:20
  • 签到天数: 605 天

    连续签到: 1 天

    [LV.9]测试副司令

    4#
    发表于 2014-9-20 13:04:47 | 只看该作者
    不能用元素识别的方式识别是个什么意思?通过元素的属性然后没找到元素,是多frame吗?
    拖拽是可以实现的,但是你得先找到元素啊。。
      Actions builder = new Actions(driver);
    builder.dragAndDrop(source, target).perform();
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-5-7 12:53 , Processed in 0.066857 second(s), 23 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表