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 do excception handling ( error handling ) in QTP
6 Answers Institute for Medical Education,
How to create a Runtime property for an object in QTP?
How can i initiate the objects to find uniquely in OR
How can we close all webbrowsers which are opened in out desktop?
Explain different checkpoints in qtp.
What is the Difference between copy to action and call to action?
There is a name "AJAY" how do u count no.of. "A" in that name ?
Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com
how to explain a claims and insurance project?
Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar
What is the difference Between LowLevel and Normal Recording Modes?
Hi All. Can you please explaing what is checkpoint? How it Will Work? what is meaning of "check checkpoint ("proprtname").how it will compate with expected value? Thanks in Advance............... Lakshmi