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



when I try to run below script in QTP "totalPages" value is 2. But i am getting error me..

Answer / 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

More QTP Interview Questions

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?

6 Answers  


How can i initiate the objects to find uniquely in OR

0 Answers   IBM, Livetek,


How can we close all webbrowsers which are opened in out desktop?

3 Answers  


Explain different checkpoints in qtp.

0 Answers  


What is the Difference between copy to action and call to action?

0 Answers  


There is a name "AJAY" how do u count no.of. "A" in that name ?

4 Answers  


Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com

0 Answers  


how to explain a claims and insurance project?

0 Answers  


Hi. please provide license key for QTP 9.2, I have windows XP on my machine Thanks in Advance, moreshwar

0 Answers  


What is the difference Between LowLevel and Normal Recording Modes?

1 Answers  


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

3 Answers   ITC Infotech, TCS,


Categories