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
desribe a situation where u faced a stressful situation and how did u cope with it
What processes will be required to manage updates to the web site's content, and what are the requirements for maintaining, tracking, and controlling page content, graphics, links, etc.?
What is the difference between analog and low level recording?
What is action?
How many types of actions are there in quicktest professional?
How many types of recording facility are available in quicktest professional?
1 Folders in VSS 2 In navigation script there are 100 script i want to run first 50 and 37th script also not needed to run how to do this 3 What is navigation script,Driver script, business script what we are loaded in this script 4 use of resource tab 5 Difference between verification and validation give real scenario example 6 file scripting object when to use it 7 what are the problems you are faced while testing web application 8 difference between expert view and keyword view 9 difference between QTP 8.2 and QTP 9.2 navigation frame work please answer these questions from real time working people as early as possible
How can you pass value one action to another action?
How to create scenario selector
For which type of projects the iterative model is not suitable?
in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?
Explain qtp(quick test professional)?
What are the various types of Actions in UFT?
What test cases can you automate using QTP?
hi to all, i need a code.. in flight application 1.i need to login first then i need to insert 3 new orders... 2.i have to log out 3.i have to login again with different user 4.need to insert 2 new orders 5.then need to log out 6.then again login with different user 7.3 new orders create and log out 8.but we hv to do this using data table and actions please help me