Hi Nishant,

Thanks for the mail.

In step 2, we are calling the fn right, but in my case around 20 objects
are created as decriptive.create in function lib (these objects are not
under function or class)

When i execute a script (where the fun lib is associated) then the function
library is getting executed and all 20 objects are executing first.

then the script is executing.

Inside script, the object reference variable is used.

eg:

Step 1: in fun lib (.vbs/.qfl) create few objects
eg:

Set obj1=Description.Create
obj1("label").value="Cancel"

Step 2: in action script:

Browser(browser).Page(page).WebButton(obj1).click

so the question is:
How can we execute the fun lib first.
How the UFT/QTP is able to store the reference variable executed in fun lib
and identify it when we used in action script.

Thanks,
L V Prasad. K

On 22 December 2015 at 21:11, Nishant Pawar <[email protected]> wrote:

> Hi Prasad,
>
> Yes it is possible to execute function lib first.
> Whenever you run a program/script in qtp then all the associated
> libraries(or libraries associated at run time) are compiled first.
> And now it depends upon the code written in your libraries whether to
> execute it or not.
>
>
> Hope below example will clarify your doubt.
>
> Step1: Create any library with .vbs extension and paste the below
> mentioned code and associate it with your UFT Test.
>
> Class Test1
>     Public function f1()
>         msgbox "test1-f1 called"
>     End function
>
>      Public Sub Class_Initialize()
>         Set o2= new Test2
>         o2.f2()
>      End Sub
>
>     Public sub class_terminate()
>         msgbox "terminate"
>     End sub
> End Class
>
> Class Test2
>     Public function f2()
>         msgbox "test2-f2 called"
>     End function
>
> End Class
>
> Set ot=new Test1
>
>
> Step2: In the UFT Action, write the below code and run it.
>
> Call ot.f1
> Set ot = nothing
>
> See what popups are getting displayed. Let me know in case you need more
> clarification.
>
>
> Thanks,
> Nishant
>
> On Thursday, December 17, 2015 at 5:51:20 PM UTC+5:30, L V Prasad wrote:
>>
>> Is it possible to execute the fun libs first? which are associated to the
>> action script?
>>
>> in my case, this is what happening. when i run a script the associated
>> fun libs (not all but only couple of them) are getting executed.
>> so the descriptive objs created under this lib are executed... then the
>> execution starting with the action script.
>>
>> wondering, how can we make the fun lib execute first?
>>
>> On 9 December 2015 at 14:12, Prasad.L.V <[email protected]> wrote:
>>
>>> Thank you Sanjeev .
>>>
>>> yeah I am aware of this matrix, so I am using only Descriptive object's.
>>> No where referring objects from .sor (shared obj rep).
>>>
>>> Thanks,
>>> L V Prasad. K
>>>
>>> On 9 December 2015 at 12:52, Sanjeev Ghosh <[email protected]> wrote:
>>>
>>>> Hi just ensure you are not switchin from object reporitory à to
>>>> descripting à and then back to object repository if any.. first two is
>>>> fine 3rd is not possible.
>>>>
>>>>
>>>>
>>>> Thanks and Regards
>>>>
>>>> Sanjeev Ghosh
>>>>
>>>>
>>>>
>>>> *From:* [email protected] [mailto:[email protected]]
>>>> *Sent:* Wednesday, December 09, 2015 12:12 AM
>>>> *To:* Digest recipients
>>>> *Subject:* Digest for [email protected] - 2 updates in 1 topic
>>>>
>>>>
>>>>
>>>> [email protected]
>>>>
>>>> Google Groups
>>>> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview>
>>>>
>>>>
>>>> <https://groups.google.com/forum/?utm_source=digest&utm_medium=email/#!overview>
>>>>
>>>> Topic digest
>>>> View all topics
>>>>
>>>> ·         New way of sharing obj rep
>>>> <#151ca5f05b008a98_CAFCk_+6zKYS8gkyOOdXw_oyQmnFpV3G7Qpoo+khZVxj8mdZocA@mail.gmail.com_15185e8199f53887_15185dfca852ac48_group_thread_0>
>>>> - 2 Updates
>>>>
>>>> New way of sharing obj rep
>>>> <http://groups.google.com/group/mercuryqtp/t/e147b88a3c25f6fe?utm_source=digest&utm_medium=email>
>>>>
>>>> Nishant Pawar <[email protected]>: Dec 07 08:05PM -0800
>>>>
>>>> Hi,
>>>>
>>>> The behavior which you mentioned is absolutely fine.
>>>> You can access the object through object repository/Descriptive
>>>> Programming.
>>>>
>>>> When you are trying the same please make sure that you are associating
>>>> the
>>>> Library to the suite.
>>>> Please let me know what problem you are facing.
>>>>
>>>> Thanks,
>>>> Nishant
>>>>
>>>> On Friday, November 27, 2015 at 11:23:37 PM UTC+5:30, L V Prasad wrote:
>>>>
>>>> "Prasad.L.V" <[email protected]>: Dec 08 10:16AM +0530
>>>>
>>>> @ Nishant,
>>>>
>>>> Thanks for the reply.
>>>>
>>>> The issue what im facing is.
>>>>
>>>> Created the descriptive objects in Fun lib and referred them in action
>>>> script by associating the library.
>>>>
>>>> Now when i execute the script, the error says that the descriptive obj
>>>> variable which i am using is not declared.
>>>>
>>>> it means UFT/QTP expecting the descriptive code to be executed first so
>>>> that UFT will get hold on reference variable then my action script will
>>>> work fine.
>>>>
>>>> but in my project(which I said, scripts are already available) the
>>>> action
>>>> script is getting executed successfully without executing the
>>>> descriptive
>>>> code.
>>>>
>>>> wondering how is this possible.
>>>>
>>>> Thanks,
>>>> L V Prasad. K
>>>>
>>>>
>>>> Back to top
>>>> <#151ca5f05b008a98_CAFCk_+6zKYS8gkyOOdXw_oyQmnFpV3G7Qpoo+khZVxj8mdZocA@mail.gmail.com_15185e8199f53887_15185dfca852ac48_digest_top>
>>>>
>>>> You received this digest because you're subscribed to updates for this
>>>> group. You can change your settings on the group membership page.
>>>> To unsubscribe from this group and stop receiving emails from it send
>>>> an email to [email protected].
>>>>
>>>>
>>>>
>>>> --
>>>> --
>>>> 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/d/optout.
>>>>
>>>
>>>
>> --
> --
> 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/d/optout.
>

-- 
-- 
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/d/optout.

Reply via email to