In Datatable having the data like this
S.no Name Address
1 raj hyderabad
2 suresh Mumbai
3 shyam chennai
4 dev banglore
i want to get the shyam row id & column id using scipting
i.e 3,3
Answers were Sorted based on User's Feedback
a=datatable.GetSheet("Action1").GetRowCount
For i=1 to a
b=datatable.GetSheet("Action1").GetParameterCount
For j=1 to b
datatable.GetSheet("Action1").SetCurrentRow(i)
If datatable.Value(j,"Action1")="shyam" Then
msgbox i
msgbox j
End If
Next
Next
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pravati
rowcount=Datatable.getsheet(id).rowcount
for i=1 to rowcount
colmncount=Datatable.getsheet(id).getparametercount
for j=1 to colmncount
Datatable.getsheet(id).setcurrentrow(i)
if Datatable.value(j,shetid)="shyam"
then msgbox i
msgbox j
exit for
end if
next
if Datatable.value(j,shetid)="shyam" then
exit for
end if
next
Is This Answer Correct ? | 0 Yes | 0 No |
a=
Browser("Creationtime:=1").page("micclass:=page").webtable("html
Id:=ctl00_contplhDynamic_ZeroChaosGrid_ctl00").GetRowWithCellText("ATT",,2)
b=Browser("Creationtime:=1").page("micclass:=page").webtable("html
Id:=ctl00_contplhDynamic_ZeroChaosGrid_ctl00").ColumnCount(a)
For i=1 to b
If
Trim(Browser("Creationtime:=1").page("micclass:=page").webtable("html
Id:=ctl00_contplhDynamic_ZeroChaosGrid_ctl00").GetCellData(a,i))=Trim("ATT")Then
msgbox "The correct row and column no" & a &" , " & i
Exit for
End If
Next
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / crazy boy
'' this is to search Shyam row and col in the webtable
DataRow=Browser("title:=givevalue").page("title:=GiveValue").webtable("name:=GiveValue").GetRowWithCellText("Shyam")
msgbox DataRow
ColumnCount=Browser("title:=givevalue").page("title:=GiveValue").webtable("name:=GiveValue").columnCount(DataRow)
for i=1 to Columncount
Data=Browser("title:=givevalue").page("title:=GiveValue").webtable("name:=GiveValue").getcelldata(DataRow,i)
if Data="Shyam" then
msgbox DataColumn
exit for
end if
next
msgbox "The Value is available in Row-->"&DataRow &" and Column -->"&DataColumn
Is This Answer Correct ? | 0 Yes | 2 No |
What is difference in global and action sheet in qtp?
how to connect qtp to sqlserver?(if any body know about this please send mail to me:sheik_feroz5@yahoo.com)thank u
how to retrieve data from flight resevation->reports
can u tell me the the cost of automation tool QTP ?
Can I use datatable of Action1 in the Action2.
Is QTP supports Unix. If yes, then how the test automation is done?
what does it mean when a check point is in red color? what do u do?
Can we run test with out adding object in object repository? How it is possible?
i am giving.multiple names like ram,raj,san etc....pls enter & search these names in google pade edit box through script... i told to interviewer, using Ms excel & test easily..but interviwer not happy with that answer?
Where virtual objects stores results?
where the check points are stored ?
hi i want license key for qtp 9.2 pls its adjust product name : quick test professional locking code :8 - 54A6A license type : seat license maintenance number : 88888888-8888 pls send license key to my email id borusu.ramkumar@gmail.com