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

5
333
analysis, automation, business
Spread the love

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.

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  How to Work With Environment Variable in UFT?

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


Spread the love
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

5 COMMENTS

  1. […] How to Get Status bar Message in UFT Fast and Efficient Manner? Read More » […]

  2. […] How to Get Status bar Message in UFT Fast and Efficient Manner? Read More » […]

  3. 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!

  4. 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 REPLY

Please enter your comment!
Please enter your name here