Search code examples
vbscriptautomated-testshp-uft

Wrong number of arguments or invalid property assignment: 'OracleNotification'


I'm currently using UFT 12.50 build 3785. With the following addins:

  • Java
  • Oracle
  • Qt
  • Visual Basic
  • Web

The following function is stored within my function library in UFT:

Public Function getMessage()     
    MsgBox OracleNotification("Decision").GetROProperty("message")    
End Function

When I call it in my Action1 as follows:

getMessage()

or

Call getMessage()

or

getMessage

I get the following error:

Wrong number of arguments or invalid property assignment: 'OracleNotification'

But when I call the required code directly in Action1 as follows:

MsgBox OracleNotification("Decision").GetROProperty("message")

Then it executes as required.

I have many other Oracle methods in my function library that are executing without any issues. (OracleButton, OracleTextfield, OracleCheckbox, etc)

Any help would be greatly appreciated.


Solution

  • I managed to resolve the issue by changing the function as follows:

    Public Function getMessage()     
         MsgBox OracleApplications("class description:=application").OracleNotification("Decision").GetROProperty("message")    
    End Function