How to Get Status bar Message in UFT Fast and Efficient Manner?

analysis, automation, business
Status bar Message in UFT
Status bar Message in UFT
How to Get Oracle ERP Status bar Message in UFT

In our day to day scenario, who works on Oracle ERP automation testing, they face this problem very often.

Here is code or function to get the status message from an Oracle ERP.

Ads code goes here

Function ERP_Get_StatusMessage()


Set obj_ORAStatus=description.Create
If oraclestatusline(obj_ORAStatus).exist Then
ERP_Get_StatusMessage=OracleStatusline(obj_ORAStatus).getROProperty("message")
End If
Set obj_ORAStatus=nothing
End Function

 

There is another classic solution provided here in this forum

By default, the Object Spy only shows Oracle recognition against Oracle Test Object when the add-in is enabled, so either of the following can be done to get Java recognition instead of Oracle temporarily:

  • Close current UFT instance
  • We need to launch UFT with add-ins  Java and Web
  • We can take a backup for the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\JavaAgent\Oracle Add-in for QuickTest\Enabled [this is to return to previous settings/functionality if needed]
  • Now set its value to zero (0)
  • We need to restart UFT with Oracle and Web add-ins.

The status bar few a times show a syntax such as “Record: 1/?” where the question mark (“?”) represents that Oracle hasn’t calculated or analyzed the table completely, thus not determining how many rows or records are on the table.

This requires forcing Oracle to analyze the displayed table and find the last record to change the question mark (?) for the real number representing the last record or row of it.

READ  Learn UFT Step By Step Manner in a Fast Pace

It’s possible to force Oracle to find that last record of the table via its own menu options:

  • We need to open the Oracle application menu called “View”
  • Navigate the menu until “Record” is seen
  • Within the displayed sub-items of “Record”, select “Last”
  • Oracle will display a “Process” dialog window indicating “Retrieving next 100 records”.
  • If the amount of rows goes higher than the mentioned 100 records, then a “Decision” dialog window will appear and in order to get to the last record, selecting “Continue to End”.

If UFT is used to automating these steps, then something similar to the following code could result:


OracleFormWindow("...").SelectMenu "View->Record->Last"
If OracleNotification("Decision").Exist Then
OracleNotification("Decision").Choose "Continue to End"
End if

Getting the text of Status Bar using Object.StatusText property of Browser object

As per motevich, we can follow the below code to get the browser status message:

sMyText = Browser("name of the browser").Object.StatusText
MsgBox sMyText

Getting text of Status Bar using GetROProperty(“text”) method of WinStatusBar object

sMyText = Browser("name of the browser").WinStatusBar("msctls_statusbar32").GetROProperty("text")
MsgBox sMyText

Share and Enjoy !

5 thoughts on “How to Get Status bar Message in UFT Fast and Efficient Manner?”

  1. I jᥙst likе the valuable ino you proviԀe to your articles.

    I wiull ookmarҝ your weblog and take a look at agɑin right here regularly.
    I’m somewhat ceгtain I will learn many
    new stuff rigght right һere! Good lᥙck foг the following!

  2. saint louis news

    I just likе the valuable info yoս provide to your ɑrticles.
    I wilⅼ bookmark your weblog and take a look at again rigһt here regularly.
    I’m somewhat certaіn I wilpl learn many new stuff гight right here!
    Good luck ffor the folloᴡing!

Leave a Comment

Your email address will not be published. Required fields are marked *