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 |
Check point what is how many types of checkpoint and explain
How to record & run on Japanese language application using english version of QTP ???
QTP Data Table Having 10 records with 10 to 15 fields(lets say).now i want to get alternative records from datatable.pls can any one answer it?
want to learn real time automation project(QTP)?
Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?
breef description of batch testing ?
i am new to qtp i do not know how to write script how to write the code to login if it fails how to able error messages
What is throw object?
descriptive program for a yahoo mail that is in yahoo mail suppose check box mailid subject assume it is like this format all things are in webtable the question is suppose some mail ids are there in that mailids i want to select the check box wich is before a@gmail.com and after that i want to click on delete button
what is the latest version of QTP? Main difference between 9.2 and 10 version
what is the diffrence bw qtp architectute and qtp framework?
How to supress warnings from the "Test results page"?