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
Descriptive Programming to check all checkboxes in a webpage
D.P for checkbox
Script to check whether yahoologinpage(www.yahoomail.com) checkbox is checked or not
Set g=Browser("name:=Yahoo.*").Page("title:=Yahoo.*")
Set obj=Description.Create
obj("htmltag").value="Input"
obj("ClassName").value="webcheckbox"
obj("type").value="checkbox"
Set a=g.childobjects(obj)
c=a(0).getroproperty("checked")
msgbox(c)
If c=0 Then
msgbox "checkbox is not checked"
else
msgbox"checkbox is checked"
End If
QTP Faqs
Manual Faqs
Load Runner Faqs
Testing Faqs Resources
Descriptive Programming for Yahoo Login Page
Descriptive Programming for Gmail Login Page
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Email").Set "abc"
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Passwd").SetSecure "xyz"
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebButton("name:=Sign in").Click
Browser("name:=Gmail.*").Page("title:=Gmail.*").Frame("name:=v1")
.Link("name:=Sign out").Click