Descriptive Programming to check all checkboxes in a webpage

script to check all checkboxes in a webpage.

Set a=Description.Create
a("html tag").value="input"
a("type").value="checkbox"

Set b=Browser("name:=").Page("title:=").childobjects(a)
c=b.count
msgbox c

For i=0 to c-1
b(i).set "on"
Next

QTP Faqs
Manual Faqs
Testing Faqs Resources
Descriptive Programming for Yahoo Login Page
D.P for getting checkbox checked status

3 comments:

keerthi said...

Very useful code and information about QTP Testing

Anonymous said...

I am new to qpt....its very useful but i have a an issue with childobjects(a)..kindly elaborate this ..so that i can run the code

Thanks in advance

Anonymous said...

I am new to qpt....its very useful but i have a an issue with childobjects(a)..kindly elaborate this ..so that i can run the code

Thanks in advance

Related Posts Plugin for WordPress, Blogger...

Fun and Knowledge