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
Answer Posted / ashok
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 |
Post New Answer View All Answers
How to get Traceability matrix from TD?
What are the various automation frameworks available in qtp?
hi can any body give me a script for creating a modularity or keyword driven framework..i am working as a qtp tester for 2 months but still i am not exposed to framework in my company
How to find the path of folder in which the test is saved in qtp?
When Recovery scenario actually starts while testing the application?
can anyone tell me from where i can download qtp demo or crack version
how to do the batch testing in test director using manual testing procedure?
How many types of recording facility are available in quicktest professional?
what is impact analysis on regression testing?
What is the differences between image check point and bit map check point?
Dis advantages of XML checkpoint ?
Can we use index on view?
What is the significance of “action 0” in qtp?
If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?
What is ‘object spy’ and what is the function of object spy in qtp?