Thanks a lot for the guidance.

On Wed, Nov 12, 2008 at 10:32 PM, Srinivas Pavuluru <[EMAIL PROTECTED]>wrote:

> Hi Raheel
>
> create on reference.vbs file in note pad.  Declare as shown below, i am
> giving example for countryName, similarly you can use it for combo..
>
>
>  Set countryNameEdit= Description.Create()
>  countryNameEdit("name").value ="countryName"
>  countryNameEdit("html tag").value ="INPUT"
> you can also declare browser page objects globally and use them in your
> script
>
>    Set empDataBrowser= Browser("name:=Emplyee
> Entry.*").Page("title:=Employee Entry.*")
>    Set empUpdateBrowser= Browser("name:=Employee
> Update.*").Page("title:=Employee Update.*")
>
> When you are entring the contry name information in Brower Emplyee Entry
> you don't have to declare countryNameEdit object in your script.. we can use
> them as
>
> empDataBrowser.webEdit(countryNameEdit).set "America"
>
> If same object appears in another page.  we can re use previously declared
> object.  if we need to update country name information in Employee Update
> page
>
>  empUpdateBrowser.webEdit(countryNameEdit).set "Australia"
>
> This way we can reduce the code in our scripting, if developer changes
> object information in his code, it is easy for us to modify anything.
> Provided we need to include "reference.vbs" file in File-Settings-Resouce
> tab.
>
> Happy Scripting...:)
>
> Thanks
> Srinivas Pavuluru
>
>
>
>
>
>
>
>
>
>
>
>
> On Wed, Nov 12, 2008 at 6:13 PM, Raheel Sheikh <[EMAIL PROTECTED]>wrote:
>
>> HI,
>>
>> There is a combo, say Country that is being used on 10 different pages.
>> There are several options:
>>
>> 1. Either I record the Country combo on each and every page, so the script
>> generated is 10 lines + the object repository displays 10 objects for the
>> same country combo.
>>
>> 2. Either I record the Country combo on one page. The script that is
>> generated against the step is pasted on 9 other tests. So this way, 10 lines
>> of code is generated and only 1 object is created. *(Not sure if it works
>> this way)
>>
>> *Need feedback on the above two statements, and need to know if there is
>> any other way.
>>
>> Regards
>>
>> >>
>>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to