UIATable operation GetCellValue throws error "Failed due to a lacking or broken API call inherited from UI Automation"

2

I am using the UI Automation add-in to automate and test an application that contains HTML objects in a Java window. I have the UIATable identified & saved in my object repository and the following methods work fine:

MsgBox UIAWindow("**").UIAObject("**").UIATable("**").RowCount     'Prints 3
MsgBox UIAWindow("**").UIAObject("**").UIATable("**").ColumnCount  'Prints 5

However, when I try to get cell value using any of the below methods:

MsgBox UIAWindow("**").UIAObject("**").UIATable("**").GetCellValue(1,1) 'Error
MsgBox UIAWindow("**").UIAObject("**").UIATable("**").GetCellData(1,1)  'Error
MsgBox UIAWindow("**").UIAObject("**").UIATable("**").GetCellName(1,1)  'Error

I get an error pop up with the following message:

The test run cannot continue due to an unrecoverable error. <0x80070057> Failed due to a lacking or broken API call inherited from UI Automation.

I am using UFT 14.02. What might be the possible reason for this error and is there something I can do to resolve this?

ui-automation
hp-uft
uft14
asked on Stack Overflow Jul 28, 2020 by Rohit Bajaj

1 Answer

1

Have a look at the UFT 14 Product Availability Matrix. You want the section "UFT GUI Testing UI Automation Add-in".

JavaFX is supported but HTML is not supported by the UI Automation Framework in UFT. That might be why some methods work and others do not. i.e. You can read the java table, but cannot validate the html content.

(I assume you are testing against a javaFX application? - you just say java)

It's worth saying that "Not Supported" doesn't mean it will not work, just that it's not been fully tested and certified by Microfocus.

Additionally, if you check the support pages it has a big note:

Note: The test objects and methods available are completely dependent on the properties and patterns implemented in your application. We recommend that you familiarize yourself with the properties of your application's objects - specifically the Control Type IDs and supported patterns to understand what test objects and methods you can use.

So the error might not be you, and might not be UFT. It might be a result of the delivery of the application under test.

Things you can try...

  • Try the actual java add-in - it is possible to use multiple add-ins concurrently - even if it's a work around for just one object.
  • Try the standard windows object identifiers.
  • Confirm the application is built to support Microsoft's UI Automation
  • Update to the latest UFT (UFT 15.01 at time of writing, now also called UFT One) to make sure your libraries are as up to date as possible

If all that fails let me know. UFT is very flexible around the GUI and depending on how you need to interact with the table there are some other solutions we can try.

answered on Stack Overflow Jul 29, 2020 by RichEdwards

User contributions licensed under CC BY-SA 3.0