*What is Object Collection* - Object Collection is a generic term and not a
keyword (this is what I feel). This is something like an array that holds a
collection of objects.. So its an array of objects..
*How do you refer to an item in it?* - Since this is an array, it will be
accessed the same way you do for an array, i.e. bu using its index.
*Example Code*: Assume you have a page with 10 links where the link text
and URL are dynamically loaded. Suppose you want always have to click the
5th link.. So here is your code for this -
*Set objDesc = Description.Create
*
*objDesc("micclass").Value = "Link"
*
*Set objAllLinks = Browser("Brw").Page("Pg").ChildObjects(objDesc)
''''Here objAllLinks is the collection of Objects
*
*'Click on 5th link
*
*objAllLinks(4).Click '''Array index starts from 0. So index 4 is used*
*Sending Keyboard Input* - This can be done using SendKeys command. You
will get the complete reference with all the commands (plain text +
function keys) in QTP help. Search with SendKeys.
Example -
*Set WshShell = CreateObject(“WScript.Shell”)
WshShell.SendKeys "hp quicktest professional"*
*
cheers,
a n i s h
[QTP Framework
Tutorials]<http://www.automationrepository.com/2012/03/qtp-framework-types-an-introduction/>|
[QTP
Blogs] <http://www.automationrepository.com/qtp-blogs/>
**
[Subscribe to get new posts in your
Inbox]<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds>
*
On Mon, Jul 29, 2013 at 5:46 PM, <[email protected]> wrote:
> Objects Collection object (What is Object collection)? Example Code?
>
> How would you refer to an item in objects collection?
>
> How do you send keyboard input?
>
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Regards,
Anish Pillai
My QTP Blog <http://automationrepository.blogspot.com>
--
--
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
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.