Thursday, April 15, 2021

How to write Classes in UFT and Build the Testing Framework. ( Developer Driven Framework)

How to write Classes in UFT and Build the Testing Framework. ( Developer Driven Framework) :

Class Code example

 This part goes in functional library

'-------------------------------------------------

Class mytestclass


Function func1()

  'code here

End Function


Function func2(x1, x2)

  'code here

            Msgbox (x1 & X2)

End Function


End Class

'--------------------------------------------------------



' This part goes in test action

'--------------------------------------

Set cobj = New mytestclass


cobj.func1


cobj.func2 (var1, var2)

'------------------------------------


No comments:

Post a Comment