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


Please Help Members By Posting Answers For Below Questions

Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?

1675


Describe synchronization point.

576


How does quicktest professional (qtp) identifies the object in the application?

581


What is the difference between rational rose and QTP?

1776


Explain the views in the QTP GUI?

617






We stored into the objects OR and then write the scripting

1539


How many types of recording modes in qtp? Which will be used when?

548


If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?

579


Explain in brief about the quicktest professional (qtp) automation object model?

563


what type of framework u r using in ur organization

1646


1. wat are the main diff b/w QTP 8.0 AND QTP 9.2 ( not user interface) 2. wat is the meaning of Keyword in keyword driven frame work? 3. how u will handle the unknown errors while exucution. (not recovery scenario)

1720


Define virtual object?

607


Explain the concept of object repository and how qtp recognises objects?

528


What is QTP testing process?

622


Explain how you can delete excel file in qtp?

585