获取行数
我用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").Selectselectitem
QTP报:Cannot identify the specified item of the outFlight object. Confirm that the specified item is included in the object's item collection. 我怎么可以把截到的图传上来呢 selectitem 是index
object.select "#"&selectitem 谢谢楼上这位朋友,但是我试了,还是不行,我这样写了脚本,想随机取一行作为选择项:
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.
请大家帮帮忙:handshake temystr = Browser(“AA").Page(“BB").Frame("rightFrame_4").WebRadioGroup("ID").GetROProperty("all items")
tempcount = Browser(“AA").Page(“BB").Frame("rightFrame_4").WebRadioGroup("ID").GetROProperty("items count")
Record1 = Split(tempstr, ";", -1, 1)
requiredRow = randomnumber(0, tempcount-1)
Record = Record1(requiredRow)
Browser(“AA").Page(“BB").Frame("CC").WebRadioGroup("ID").Select Record 谢谢楼上这位朋友,OK啦:)
页:
[1]