when I try to run below script in QTP "totalPages" value is
2. But i am getting error message (Type mismatch:
'totalPages' Line (): "For i=1 to totalPages".)
totalPages=Browser("Name:=User").Page("Title:=User").WebElem
ent("innertext:=of.*").GetROProperty("InnerText")
msgbox totalPages
For i=1 to totalPages
rnum=Browser("Name:=User").Page("Title:=User").WebTa
ble("column names:=User Name;ID;Last Name;First
Name").GetRowWithCellText("store4")
If rnum>0 Then
r=rnum
Exit for
End If
Browser("Name:=User").Page("Title:=User").WebElement
("html tag:=A","x:=471").Click
MsgBox "Exit"
Next
Hi,
totalPages value is in string, that so u got this error
change to numeric, for that use CInt
example:
totalPages = CInt(Browser("Name:=User").
Page("Title:=User").
WebElement("innertext:=of.*").GetROProperty("InnerText"))
Or
For i=1 to CInt(totalPages)
Regards,
Ashok
| Is This Answer Correct ? | 2 Yes | 0 No |
How to retrieve the object properties at runtime without the usage of GetROProperty?
Hi All I am installing QTP 8.0/8.2 in my office desktop (WIN XP) but it is not working. Inspite Installion is succesfully done but when i open qtp from programs it opens only first screen of add-in and after that it disappears. But in my other computer at home (winxp) it is working fine. Can you please give the reason, why it is not working in office desktop. DEEPAK SINGH
What are Error handling other than Recovery scenario manager?
I am using Shared OR, and my collegues are also using Shared OR. How to merge Object Repositories?
In qtp, how you can exit for loop?
Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....
Do we get any issues if we run the testscript on different browsers? what are the options we need to st in QTP?
can i change the runtime properties of an object ? How can i check if a parameter exists in database ?
When do go for loop condition in test?
What is the maximum size of Object Repository in QTP 8.2?
How will you handle application crash using recovery scenario manager(step by step process)?
Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.