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

Hi Friends, Every one is posting the Answers for the existing questions.Try to post the questions that are asked in Recent Interviews.It will be useful to the other Job seekers.

1 Answers  


Hello, Is there any way to send the test results in html format (or any other) by email using outlook after the test run ends? thank you in advance

0 Answers  


How to record object in runtime. I am testing one Image website in which every time image change on home page.so if i records the image list but during running image get change, and QTP gives error

1 Answers  


How to handle exception when data table is not available in local host system or path is not correct(explain statement with example)

1 Answers  


Consider a scenario where there are two action sheets say action 1 and action 2. Can Action 1 take values from action 2 data sheet or vice versa. If so, how?

6 Answers   Oracle, TCS,






Hi, Can we open a test in qtp10 which is saved in qtp 9.2?

0 Answers  


If there r 1000 test scripts that were written. If a change to any functionality is to be made then how can we know in which script is this functionality existing.

4 Answers   iGate,


i have asked earlier only one question how to test web application using QTp plz send me the answer quickly

0 Answers  


How to use the object spy in quicktest professional 8.0 version?

0 Answers  


How to find the length of the string in qtp?

0 Answers  


What is the use of virtual objects?

1 Answers  


What is the use of an object spy tool in qtp?

0 Answers  


Categories