Hi Roman,
Thanks for taking time to explain very clearly.....many thanks

I have a another question….

My main Driver scripts reads something like this

If Datatable(“Column_Name”, dtGlobalSheet) = “Something” Then
RunAction "Action_Name_1", oneIteration, "No"
RunAction "Action_Name_2", oneIteration, "No"

ElseIf Datatable(“Column_Name”, dtGlobalSheet) = “SomethingOtherThing”
Then
RunAction "Action_Name_3", oneIteration, "No"
RunAction "Action_Name_1", oneIteration, "No"

-------------------------------------------------------------------

Within the Action…..

If Parameter("Validation")="Yes" Then

Run this Script (Current Live System)

ElseIf Parameter("Validation")="No" Then

Run this Script (New system with same screen flow but different
properties)

End If

-------------------------------------
So If I use Function how can I split my function into 2…..like I have
done in action using parameter (validation)

Many Thanks




On 24 June, 15:04, Roman Zilber <[email protected]> wrote:
> Hi,
>
> Function:
>
> Easier to maintain 15 functions, than 15 actions :
> You can choose nice location (ex. folder named lib/)
> You can split functions to number of vbs files with meaningful name
> example:
> App_Login(name, password)
> App_Logout()
> App_LoginTest(name)
>
> in file APP_Login.vbs
> Easy to maintain source control, only text files need to be saved (have to
> be unicode format)
> Easier to manage code (diff between text files, and diff between Action
> folders)
> Easier to share code between projects
> QTP doesn't create extra runtime datasheet each time you call a function (it
> make me crazy when I work with Actions)
> You can open many functions at the time
> ...
>
> Actions:
>
> Build in connection to Data table (in function you need to specify data
> table name)
> You can record directly in Action (can't in functions)
> Big minus - you don't see Actions name, if a Test with the actions is not
> open.
>
> Roman
>
> Clear interface - you see function name and function parameters
>
> On Wed, Jun 24, 2009 at 4:47 AM, johnthenu <[email protected]> wrote:
>
> > Hi, I have a customer form filling script with 15 pages......i am
> > using DP for all the objects....except for page name and browser
> > name......
>
> > Each customer will see different combination of pages depending on
> > requirement which will be defined from the drive script.....
>
> > In this scenario should i make each of the page a action or a
> > function....and what are the benefits making them as a function as
> > apposed to action....
>
> > 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]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to