If i entered 2 columns and 4 rows inputs in DDT Like Mango
fruit, Banana Fruit, Brinjal Veget, Carrot Veget.. . My Q
is How to get the 2nd column value for corresponding 1
column input in 3rd row ie, ( i need to get "veget" in
messge box @ run time
Answers were Sorted based on User's Feedback
Answer / satya
strCnt=DataTable.getRowsCount
For i=1 to strCnt
datatable.SetCurrentRow(i)
x=datatable.Value("A")
datatable("c")=x
Next
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / ratna
datatable.setcurrentrow(3)
x=datatable.value(2,1)
'datatable.value(2,1) where 2 is column name and 1 is sheet
no. ie., 1 is for global sheet
msgbox x
'output is veget
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / saff
i= inputbox "enter ur string" # say brinjal
r=datatable.getrowcount #get row count
for i=1 to r #loop till the end of the row
datatable.setcurrentrow(i)
aa=datatable.(a ,dtglobalsheet) # column 1 value into aa
if instr(aa,i,1)=1 #compare the strings
bb=datatable(b,dtglobalsheet)
msgbox bb
exit
else
i=i+1
next
| Is This Answer Correct ? | 0 Yes | 1 No |
How will you test a stapler?
I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing
What is an other way of "Wait" statement in QTP I dont want to use wait("Some number"). Can any one tell this please..........
w is fragmentation and paging
Explain how you can find the absolute value of the number in qtp?
can onyone tell me how to comapre the output of two different Data Bases in QTP?
Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?
suppose there r 10 action in a test i want to execute action 5 to 10 how would i do that
what is the defference between QTP 8.2 and 9.0and 9.2? plz tell me
what is spy, and how can u use?
How to handle Recovery scenario in QTP. give detailed explanation about recovery scenario.
In how many ways we can add check points to an application using QTP.