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 |
what is the extension for the test version of the script?
Create flight reservation login descriptive programing (Condition: Remove the value and substitute with a variable, and then call the validation from Excel) Plz help me....... very urgent.........
How to indentify MS-Word objects like Menubar, Toolbar, table/columns/rows/cells etc within Word document, using QTP?
What is difference between QTP 8.2 Obect Repository and QTP 9.2 object Repository?
How to get popup error message.
How to create configuration scripts
How do u do batch testing in WR & is it possible to do in QTP, if so explain?
Give me detailed theritical explanation about keyword driven, hybrid framework, environment variables, hybrid frame work
What is keyword driven framework?
Why qtp always start action1 and does not start action?
How to identify 2 versions of browsers based on regular expression
hi, In A Table there are some columns and dynamic rows and in each row in first column there is a link with name. upon clicking on that link it will show some details. write the vbscript to check that link without descriptive programming?