06 November 2017

Class Implementation in UFT

Class Calculate
    Function Add(a,b)
        Add = a + b
    EndFunction

    Function Multiply(a,b)
        Multiply = a * b
    EndFunction

EndClass

Set calc = New Calculate

val1 = calc.Add(20,30)   'Return 50
MsgBox"Add = "&val1

val2 = calc.Multiply(5,4)   'Return 20
msgbox"Multiply = "&val2



...

No comments:

Post a Comment

AOM - Automation Object Model

'Creating QuicTest Object Set  qtapp =  createobject ( "QuickTest.Application" ) 'Launching the Application If  qtapp...