标题: silktest的TABLE识别不了的问题 [打印本页] 作者: andywesley 时间: 2009-7-27 15:37 标题: silktest的TABLE识别不了的问题 我有个TABLE,单元格里有图片,找了帮助Definition of a table
?a table with 2 or more rows (specified with the <tr> tag in the page source)
?where at least 1 row has 2 or more columns (specified via the <td> tag in the page source)
A single <td> with a colspan >1 does not qualify as 2 or more columns.
觉得好像是这个问题,求教高手如何解决
另外,我的项目被测系统就是中国上海移动的网上营业厅,jmy_1981你可以登陆上去看,不过需要有积分的,因为这个模块是 积分服务-》积分查询-》积分和兑换历史,我觉得这个问题属于SILKTEST深层次的问题,jmy_1981可以看看,我们可以通过其他途径详细交流交流,研究研究,呵呵作者: andywesley 时间: 2009-7-28 11:31
我的QQ是282848216,有兴趣加我好友作者: andywesley 时间: 2009-7-28 11:48
AIHtmlDataTable 是我对HtmlTable的扩展,修改domex.ini只是做尝试,为了不对其他的功能块有影响,实际我的做法是在程序里使用BrowserPage.SetUserOption方法来修改选项作者: lantianwei 时间: 2009-7-30 11:37 标题: 回复 1# 的帖子 I think below information is useful for you:
GhostTable is a class which turns itself on and off as needed by using whatever value is required to make the table appear.
winclass GhostTable : HtmlTable
setting DontInheritClassTag = TRUE
// create this data member in your ghost table and
// set this to the value required to make this table
// "appear" to SilkTest
REAL rBorderlessTableSetting
REAL rOldSetting
void Appear ()
WINDOW wParent
// find the top level parent of this instance
wParent = GetTopLevelItem (this)
// grab the current setting
this.rOldSetting = wParent.GetUserOption ("ShowBorderlessTables")
// set to the new setting for the parent
wParent.SetUserOption ("ShowBorderlessTables", rBorderlessTableSetting, USEROPT_WINDOW)
Additionally, there's a Vanish method that , sets the ShowBorderlessTables setting back to the original. The methods for the HtmlColumn class call this class method so that you can call HtmlColumn methods as well. The downside to this is that it will be required to rewrite the HtmlTable and HtmlColumn classes to first use Appear and then Vanish e.g.
INTEGER GetColumnCount ()
INTEGER iRtn
// make the table appear
Appear ()
// get the built-in method's value
[-] do
[ ] iRtn = derived::GetColumnCount ()
[-] except
[ ] Vanish ()
[ ] reraise
// make the table disappear
Vanish ()
[ ] return iRtn