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
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 |
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 |
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 |
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 |
Hi, I'm a beginner in QTP and planning of a certification in QTP, but have no idea about it :P. Could anyone please tell me what certifications that a QTP- beginner can take? What is the fees and the syllabus for the certification? Please reply soon. Thanks Vidhya
Suppose one object is changed in a project after delivering the project.Where we will update that object? it can be present in many scripts so can we update all the scripts?
hi friends i have 4 yrs exp in testing and 2 yrsexp in QTP.currently aim working in mnc in north as a permanent employer .iam looking for job in south is there any openings plz let me know my mail id is bjr@aol.in its very urjent
What are the five challenges you faced in QTP?
There is one parent browser and 'n' number of child browsers on desktop. Write a code to close all the child browsers but parent browser should not be closed.
What are associated files in QTP?
wht type of User defined functions or Java Releated functions do we write in VB scripting
How to Import the data from MS-Access in QTP?
What is the Difference between copy to action and call to action?
how to get font size of a "WebEdit"
How to connect to data base?
1>why parameterization is necessary in qtp? 2>if we give constant value then what problem?