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

how do check the links in a webpage ?

7 Answers   Accenture, Wipro,


how much space occupies in object respository by default?

5 Answers   VSoft,


what is the abbrivation of .mtr in action reposirtory?

8 Answers   GE,


What are the challenges do we face while testing webbased applcations using the automation tool QTP or any?

1 Answers  


how can i use text check point in descriptive programming. or else is there any way to compare the text in the application and the text in data table.

2 Answers  


How can we retrieve the links from a web page where links are dynamically changing(for eg take a online shopping website) and then we have to click on all the links present in the webpage and go to the repective pages and again come back to the first page..

2 Answers  


What are the types of object repository in qtp?

0 Answers  


how can we know the program is testing by multiple test data in data driven frame work?

1 Answers   CTS,


what are the attributes of QTP?

3 Answers  


in qtp how can we do test when the build is not ready

3 Answers   Mindlance,


pls tell me different type of automation frame works in QTP and which one need to select in client server application

7 Answers   Syntel,


IF there are seven browsers with same name open. I want to close one particular browser thru QTP. how can i do this?

3 Answers   Polaris,


Categories