Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to get Traceability matrix from TD?

1269


What are the various automation frameworks available in qtp?

1024


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

1950


How to find the path of folder in which the test is saved in qtp?

1063


When Recovery scenario actually starts while testing the application?

2094


can anyone tell me from where i can download qtp demo or crack version

2042


how to do the batch testing in test director using manual testing procedure?

2428


How many types of recording facility are available in quicktest professional?

1154


what is impact analysis on regression testing?

2536


What is the differences between image check point and bit map check point?

1134


Dis advantages of XML checkpoint ?

2048


Can we use index on view?

2127


What is the significance of “action 0” in qtp?

1122


If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?

1074


What is ‘object spy’ and what is the function of object spy in qtp?

1171