there are having 10 checkboxes..how can i check only first
5 check boxes by using descriptive programing..

Answer Posted / vishnu

// Save the below script in Htm format

<html>
<body>
<form>
YES / NO1: <input type="checkbox" name="CB1"></br>
YES / NO2: <input type="checkbox" name="CB2"></br>
YES / NO3: <input type="checkbox" name="CB3"></br>
YES / NO4: <input type="checkbox" name="CB4"></br>
YES / NO5: <input type="checkbox" name="CB5"></br>
YES / NO6: <input type="checkbox" name="CB6"></br>
YES / NO7: <input type="checkbox" name="CB7"></br>
YES / NO8: <input type="checkbox" name="CB8"></br>
YES / NO9: <input type="checkbox" name="CB9"></br>
</form>
</body>
</html>


'Descriptive Programming

'Suppose we are having 10 checkboxes..How can We check only first 5 check boxes by using descriptive programing?
SystemUtil.Run "iexplore","file:///C:/Users/Administrator/Desktop/sample.htm"

Set BP=Browser("CreationTime:=0").Page("micclass:=Page")

BP.WebCheckBox("name:=CB1").Set "ON" 'ON is used to check
BP.WebCheckBox("name:=CB2").Set "ON"
BP.WebCheckBox("name:=CB3").Set "ON"
BP.WebCheckBox("name:=CB4").Set "ON"
BP.WebCheckBox("name:=CB5").Set "ON"
BP.WebCheckBox("name:=CB6").Set "OFF" 'OFF is used to Not Check
BP.WebCheckBox("name:=CB7").Set "OFF"
BP.WebCheckBox("name:=CB8").Set "OFF"
BP.WebCheckBox("name:=CB9").Set "OFF"

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

869


What is a programmatic description?

603


What are the main differences of qtp and win runner?

595


how to test Web application using QTP software

1332


Where can I find and view run-time data table?

525






Hi Friends, How many types of Data Bases available in market... What is the diff. while using Syabase and Oracle in a Project... ? and what is the main diff. of Syabase and Oracle databases... ? Thanx in advance..

1514


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

2870


What are the 3 main stages involved in testing with qtp?

556


What are the different types of qtp test assets and their extensions?

599


which type of testing process are you following in ur company? how to recognize a qtp page?

1403


What is the syntax to call one script from another?

540


when will you do debug your script? and explain that process?

1452


Hi Friendss..., can any body help me.. 1. Tell me your achievements(Technically)..? 2. Tell me your strengths(Technically) and weakness(Technical)..? 3. Why are you looking for change..?

1420


Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

1389


Is text area check point supports for web applications?

533