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 test fly out menu in qtp?
Which functionalities of QTP used in banking project?
I heard that in Hyderabad Ameerpet is renowned for its training institutes it has , but from my own experience I can only say that this institutes have become money making machines losing their cognitive ability and ethics , can anybody tell me is there a good ins. in hyderabad for testing tools.?
What is the difference between QTP 8.2 object repository and QTP 9.2 object repository Any body have an please give Answer Mail id: nagireddy.sn@gmail.com
what is meant by iterative model?What is its working principle?What are its advantages and what are its drawbacks?
what is parameterisation?
write a script for get the following result: username password frm the string1="A=username" string2="B=password"
suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question
How to create Reusable and Multiple Actions?
keyword driven framework having how many folders? explain folders in detail?
write script for "dropdown button having how many words? for ex.SELECT CITY is dropdown name.. find out how many cities in that?
what is framework? which frame work u follow for writting script?