51Testing软件测试论坛

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

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 2770|回复: 2
打印 上一主题 下一主题

如何使用watir识别flytreeview控件

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2010-6-3 11:09:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
> I am testing an ASP.NET app that uses a FlyTreeView
> control
>

>
> The HTML includes elements in node tags, which are
> links to reports in the
> AUT:
>
> <NODE Key=&quot;1&quot; Text=&quot;Summary
> Reports&quot;
> ToolTip=&quot;Summary Reports&quot;
> IsChecked=&quot;False&quot;
> Disabled=&quot;False&quot;
> DefaultStyle=&quot;padding: 3px 5px 3px 5px;
> FONT-FAMILY: Tahoma; FONT-SIZE: 11px;&quot;
> CanBeSelected=&quot;False&quot;><NODE
> Key=&quot;5&quot; Text=&quot;Basic
> Summary&quot; ToolTip=&quot;Basic Summary&quot;
> IsChecked=&quot;False&quot;
> Disabled=&quot;False&quot; />
>
> I checked a link using SpySmith and it shows as text
> enclosed in a table
> cell tag <TD>:
>
> Active Element: [TD], Index: [182]
>  <TD title="Basic Summary" style="PADDING-RIGHT:
> 5px; PADDING-LEFT: 5px;
> FONT-SIZE: 11px; PADDING-BOTTOM: 3px; CURSOR: hand;
> PADDING-TOP: 3px;
> FONT-FAMI
>  LY: Tahoma; TEXT-DECORATION: underline" noWrap
> width="100%">Basic
> Summary</TD>
>
> I tried to get at the link using Watir, but the cell
> text shows as one long
> string for all links:
>
> irb(main):044:0> ie.table(:id,
> 'StandardReportsTable')[1][1].text
> => "Standard Reports\r\nSummary
> Reports\r\nLoading...\r\n\r\n\r\nBasic
> Summary\r
> \nLoading...\r\n\r\n\r\n\r\nSummary by Sales
> Channel\r\nLoading...\r\n\r\n\r\n\r
> \nSummary by Price
> Level\r\nLoading...\r\n\r\n\r\n\r\nSummary by Ticket
> Type\r\n
> Loading...\r\n\r\n\r\n\r\n\r\nGeographical
> Reports\r\nLoading...\r\n\r\n\r\nSale
> s by Geographical
> Location\r\nLoading...\r\n\r\n\r\n\r\n\r\nSales by
> Day
> Reports
> \r\nLoading...\r\n\r\n\r\nSales by
> Day\r\nLoading...\r\n\r\n\r\n\r\nSales by
> Day
>  by Channel\r\nLoading...\r\n\r\n\r\n\r\nSales By
> Day By Price
> Level\r\nLoading.
> ..\r\n\r\n\r\n\r\nSales by Day by Ticket
> Type\r\nLoading...\r\n\r\n\r\n\r\n\r\nE
> vent Detail Reports\r\nLoading...\r\n\r\n\r\nEvent
> Detail\r\nLoading..."
>
>
> I am stumped. I can't seem to 'click' a link using
> Watir.
>
> Does anyone have any advice? Is this even possible
> using Watir?
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2010-6-4 08:58:38 | 只看该作者
没有人关注这块么?
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2010-6-14 15:13:17 | 只看该作者

回复 1# 的帖子

试试用Java Script控制tree

WATIN有能运行JS的接口,但调用什么JS能够实现你想要的效果得你自己找。
对flytreeview控件不了解,你根本也没贴图,无从知晓你要操控的对象是什么玩意。
回复 支持 反对

使用道具 举报

本版积分规则

关闭

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

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

GMT+8, 2024-5-22 00:51 , Processed in 0.076150 second(s), 27 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

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