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.

Answers were Sorted based on User's Feedback



7. Given scenario is like this: One Web table is there and you have to search and retrieve a cell ..

Answer / balaji s

Vinay there is no need to go this much.we can directly
retrieve using getcelldata metho

row=Browser(..).Page(..).Webtable(..).Rowcount

column=Browser(..).Page(..).Webtable(..).columncount

For i=1 to row
for j=1 to column
val=Browser(..).Page(..).Webtable(..).getcelldata(i,j)
if val="123" then
msgbox "the row is "&i

Is This Answer Correct ?    12 Yes 1 No

7. Given scenario is like this: One Web table is there and you have to search and retrieve a cell ..

Answer / mohan

I think we can get row number where text "123 " displayed By
using Get Row With Cell Text method

Is This Answer Correct ?    2 Yes 1 No

7. Given scenario is like this: One Web table is there and you have to search and retrieve a cell ..

Answer / gangadhar reddy

row=Browser( ).Page( ).WebTable( ).GetRowWithCellText("123")

it will returns the Row Number in which the cell data is 123

Is This Answer Correct ?    1 Yes 0 No

7. Given scenario is like this: One Web table is there and you have to search and retrieve a cell ..

Answer / 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

More QTP Interview Questions

How to merge the two object repositories

3 Answers   Wipro,


if Object repository contain x and y properties. we do not know whether they are mandatory or assistive properties. While executing the script qtp will use both the properties or only sufficient properties to identify the object. It means it use OR (or) AND

8 Answers   ADP,


How to start recording using quicktest professional (qtp)?

0 Answers  


who is the best faculty in HYD? Nageshwar rao or GC reddy?

3 Answers  


Please give me the steps to carry out datadriven in QTP8.2

2 Answers  






what are the attributes of QTP?

3 Answers  


Can anybody send me the code to get the RO property of the active screen in QTP while running?

9 Answers  


How many types of parameters are available in quicktest professional?

0 Answers  


How many test scenarios you have automated? How many time it will take to execute 30-40 scenarios? What SDLC model you are following? How often you will execute your test scripts? Because of some changes, your test scripts failed? When you will update your test scripts? How much time it will take to update? Do you know how to connect database? Do you know the direct method to count no. of records (or) rows present in record set once query is executed? How will you create the connection string? How did you resolve conflicts present in Object Repository? How good you are in VB? How will you work on Excel Application? How will you select Excel sheet? If you want to select 10 sheets, will you create 10 separate objects? Given string is “abcd”. What are the methods you will use to display “dcba”? Drives script – explain the frameworks? How you are updating results for each test? What is start up, configuration, navigation scripts? If you are not able to understand the application (some module), who will teach you? What test cases to be automated? When to be automated? What is the testing process you are following? What life cycle you are following? When you will use Descriptive Programming? Do you have the permission to add objects into shared object repository? (OR) someone will maintain SOR? Do you know how to add objects into shared object repository? How many test cases you have automated? How much time will it take to execute? What is complex in automation? When you feel automation is complex? Tell me one scenario, the complex functionality you have automated in your project? Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet. Rate yourself in SQL? Display the employee name who is getting maximum salary? sal ID Salary name 001 100 002 500 003 300 ID 001 002 003 Ename A B C Have you written any test cases while you are in Automation? Manual Testing also will you do or you will work only in automation?

0 Answers  


What is Environment Variable and when we apply this in QTP?

4 Answers  


Anybody explain me, the concept of checkpoint declaration in the QTP mainly for the Objects, Pages, Text and Tables ?

1 Answers  


how to create the varibles and how these are connect to qtp? plz tell me

3 Answers  


Categories