Hi
I think you want to check a check box then this script would help you. I am
using descriptive programming.
*We will consider Gmail for our understanding.*
'Creating a description object for check boxes
Set abc_obj = Description.Create
abc_obj("micclass").Value = "WebCheckBox"
'Getting the childobjects i.e Checkboxes
Set browser_checkbox =
Browser("title:=Gmail.*").Page("title:=Gmail.*").childobjects(abc_obj)
'using a for loop to set the check boxes to on position i.e selecting them
For i = 0 to browser_checkbox.count - 1
browser_checkbox(i).set "ON"
Next
*If we consider the flight reservation application then this code will help
you to check and uncheck the checkboxes*
'Script to check and uncheck all the checkboxes in open order dialog box of
flight reservation application
Set checkbox_obj = Description.Create
checkbox_obj("Class Name").value = "WinCheckBox"
Set chd_obj = Window("text:=Flight Reservation").Dialog("text:=Open
Order").ChildObjects(checkbox_obj)
For i = 0 to chd_obj.Count - 1
chd_obj(i).Set "ON"
chd_obj(i).Set "OFF"
Next
Regards, Kiran Paul
<http://qtp4free.blogspot.com>
--- @ WiseStamp
Signature<http://my.wisestamp.com/link?u=9m92zjczzzgs4dcx&site=www.wisestamp.com/email-install>.
Get it
now<http://my.wisestamp.com/link?u=9m92zjczzzgs4dcx&site=www.wisestamp.com/email-install>
On Thu, Aug 5, 2010 at 7:45 PM, ann hoang <[email protected]> wrote:
> Please advise how do I check button or checkbox, listbox enable or disable?
> Please advise!
>
> Many thanks
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<mercuryqtp%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en