标题: 获取行数 [打印本页] 作者: liyf51 时间: 2008-8-28 11:04 标题: 获取行数 我用MERCURY自带的订票系统去练习,想取它的行数,但是不知道用什么函数取,请大家帮忙,那个网页我已经截图了,放在附件里。
这个是我写得:
itemcount = browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("outFlight").GetROProperty("items count")
selectitem = randomnumber(1,itemcount)
browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("outFlight").Select selectitem
QTP报:Cannot identify the specified item of the outFlight object. Confirm that the specified item is included in the object's item collection.作者: liyf51 时间: 2008-8-28 11:05
我怎么可以把截到的图传上来呢作者: zte_boy 时间: 2008-8-28 11:22
selectitem 是index
object.select "#"&selectitem作者: liyf51 时间: 2008-9-2 11:41
谢谢楼上这位朋友,但是我试了,还是不行,我这样写了脚本,想随机取一行作为选择项:
NumOfItems = browser("Welcome: Mercury Tours").Page("Select a Flight: Mercury").WebRadioGroup("outFlight").GetROProperty("Items Count")
randomcount = randomnumber(1,NumOfItems)
Browser("Welcome: Mercury Tours").Page("Select a Flight:
Mercury").WebRadioGroup("outFlight").Select randomcount
QTP执行后报:Cannot identify the specified item of the outFlight object. Confirm that the specified item is included in the object's item collection.
请大家帮帮忙作者: fengmingbao 时间: 2008-9-2 11:56
temystr = Browser(“AA").Page(“BB").Frame("rightFrame_4").WebRadioGroup("ID").GetROProperty("all items")