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 get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric
What are the common defects found in your project? (in qtp interview)
HOW TO CONVERT MANUAL TEST CASES IN TO AUTOMATION TEST SCRIPTS EXPLAIN THE PROCESS?
how could i download qtp in which i get add-in support for 'oracle' is there any way to get it? i finding but not getting pls help me out :)
explain keyword driven framework with banking domain?
In website, protocol has been changed http:to https what you will do? tell me your approach?
Explain more about the Test Fusion Report of QTP?
Hello Everybody, Please tell me can we create Test Plan in QTP? This I am asking irrespective to integrating with Test Director.I mean is there any option to create Test Plan in QTP itself. Thanks, Gaytri
what is the use of descriptive programming in QTP ? when we need to use DP? can we test the application completely with out useing DP?? please explan with example
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
how to get the data from a winedit box in vb scripting and store it in a variable if data contains "_"(i.e data is TEST_1)
What are the disadvantages of Recovery Scenarios in QTP ?