In Webtable New rows getting added, we have select the name as Sandeep ,If name column is sandeep then need to check the checkbox ,we don't know the rows and columns ,Can anyone please tell me the answer.

Answers were Sorted based on User's Feedback



In Webtable New rows getting added, we have select the name as Sandeep ,If name column is sandeep th..

Answer / swat

you can also try this : Using childitem method of webtable :
Set Table = Browser("").Page("").Webtable("")
Row_cnt = Table.RowCount
for i = 2 to Row_cnt
If trim(lcase(Table.getcelldata(i,3))) = "Sandeep" Then
Table.childitem(i,3,"Webcheckbox",0).Set "ON"
End If
Next

Is This Answer Correct ?    2 Yes 0 No

In Webtable New rows getting added, we have select the name as Sandeep ,If name column is sandeep th..

Answer / mogal

RC = Browser("Browser").Page("Page").WebTable("html tag:=TABLE").RowCount
RC = Browser("Browser").Page("Page").WebTable("html tag:=TABLE").ColumnCount(1)

RN = RC = Browser("Browser").Page("Page").WebTable("html tag:=TABLE").GetRowWithCellText("Sandeep")

For j = 1 to CC
If Browser("Browser").Page("Page").WebTable("html tag:=TABLE").GetCellData(RN,j) = "Sanddeep" Then
CN = j
End If
Next
Set OExpBox = Browser("Browser").Page("Page").WebTable("html tag:=TABLE").ChildItem(RN,CN,"WebCheckBox",0)
OExpBox.Click

Is This Answer Correct ?    1 Yes 0 No

In Webtable New rows getting added, we have select the name as Sandeep ,If name column is sandeep th..

Answer / pushkar1206

Set obj=description.Create
obj("micclass").value="webcheckbox"
Set obj2=browser("Browser").Page("Page").childobjects(obj)
rw=browser("Browser").Page("Page").WebTable("Table 1").RowCount
For j=1 to rw
b=browser("Browser").Page("Page").WebTable("Table 1").GetCellData(j,3)
If b="N" Then
obj2(j).set "ON"
End If
next

3= Sandeep column number
try this and let me know. thanks

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

what is qtp automation frame work,what is the use of that frame work?

64 Answers   Cap Gemini, IBM, iGate, TCS,


I installed QTP 9.5 on vista. Can someone please provide me the license key of the same. Thanks, Avi

2 Answers   Xavient,


How 2check the color of the text in the textfield . say suppose the text entered in the textfield object is appearing in red. so i want to check whether the text is in red color or not. It could be great help for me if any one solve's my issue. plz...help

5 Answers   Sinertel,


What is system testing and what are the different types of tests you perform in system testing?

0 Answers  


how can you select random value for every iteration from a weblist

4 Answers   Microsoft,


How many number of actions possible in qtp?

0 Answers  


Is virtual object supported in low level recording mode?

0 Answers  


How to run an integrated test scenario using Multiple Actions? How to use the QTP Step Generator?

0 Answers  


what about f2&f6 function keys

1 Answers  


if there r 10 windows open in QTP write a command to close all 10 windows at a time ?

11 Answers   Wipro,


what is batch testing?

1 Answers  


what is diff b/w function and action?

8 Answers   VSoft,


Categories