7. Given scenario is like this: One Web table is there
and you have to search and retrieve a cell data which is
equal to the given number say:123. Assume you have given
with the column name/id of the table where the number may
exist. So now you have to go to the given column and search
for the number 123 and retrieve it along with the row
number of it.
Answer Posted / vinny
Hello,
For this scenario we can write in Descriptive program,
You need to create an object and get the total rows count in
the table. Check the below script.
Let say the "id numbers" in the "ID" column are links.
Dim i,j,k
Dim Numberofrows, Links, IDLink, Val
Set IDLink=description.Create()
IDLink("micclass").Value="Link"
IDLink("html tag").Value="INPUT"
IDLink("abs_x").Value=abs_xvalue "note: you can get the
abs_x value of the column and enter the value here"
Set
Links=Browser("micclass:=Browser").page("micclass:=Page").ChildObjects(IDLink)
Numberofrows = Links.Count()
Do While i<=Numberofrows-1
val=trim(Browser("micclass:=Browser").page("micclass:=Page").Link("html
tag:=INPUT","abs_x:="&abs_xvalue,"html
id:=TD","index:="&i).GetRoProperty("value")
if Val = "123" then
msgbox "the Value 123 is in the row:" &i+1
Exit Do
End if
i=i+1
Loop
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What if recovery scenarios is also failed for identify the alert ? (We are handling unexpected popup through recovery scenarios but if still recovery scenarios also failed than what should be the approach)
How to make qtp understand the difference amongst the same type of objects .suppose there are 5 check boxes in a page and I have to choose the 2nd one, how to do that through script?
Can we create a qtp test from qc?
What are the steps involved in the recovery scenario wizard?
How to run a test using quicktest professional (qtp)?
terminal services client
how interviews will be on QTP?
What are advantages of test automation?
Is it possible to change the property value at runtime? How it is possible?
How to create Reusable and Multiple Actions?
What is the use of an object spy tool in qtp?
Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain
How to use conditional loops in qtp ?
HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?
What is the difference in testing a client-server application and a web application?