Forum Discussion

Emanuela's avatar
Emanuela
New Contributor
4 years ago
Solved

ClickCell() action returns "an error occured" while clicking on QTableWidget.

Hello everyone,

 

we are testing a desktop application, built with Qt libraries and we stumbled in an issue when testing it with TestComplete (v14.60)

 

Attached are few screens of what is the situation. The first one are the trials we made to execute the expected action. We tried using a python script, using a ClickCell with a script to find the right row or directly giving it the desiderate value (1, 1). All of those return the "An error occurred" issue.

 

Instructions

 

The script used to find the right row is the following:

Aliases.RockSpotControllerGUI.ids_heron_HeronGUI.TabWidget.qt_tabwidget_stackedwidget.ids_heron_CentralWidgetSession.Widget.TabWidget.qt_tabwidget_stackedwidget.ids_heron_SessionWidget.TabWidget.qt_tabwidget_stackedwidget.ids_heron_SessionStatusWidget.ids_heron_AlarmsWarningsWidget.TableWidget.FindRow(2,"Camera 1 connection error (Error code 6004)")

 

and returns the expected value, which is 1.

This script is then used in the ClickCell() method as first parameter (row), the second parameter (column) is hardcoded as 1.

Following there is a screen of part of the application, showing the table where the click is failing. The interested row is the second one "Camera 1 connection error...")

 

 

We supposed it could be a problem of the "System Alarm - Critical" popup that is showing, like it could be an overlapping window, but even hiding it does not solve the issue.

We also tried to click on the background before clicking on the desired cell but that does not change the result.

 

The output of the generic error is the following:

Possible reasons:

1. The application stopped responding.
2. The application was compiled incorrectly (see the Open Applications topic in the help system).
3. An error occurred in TestComplete/TestExecute.

Technical information:
37 0x80004005 (Unspecified error) .

Tested object:
Aliases.RockSpotControllerGUI.ids_heron_HeronGUI.TabWidget.qt_tabwidget_stackedwidget.ids_heron_CentralWidgetSession.Widget.TabWidget.qt_tabwidget_stackedwidget.ids_heron_SessionWidget.TabWidget.qt_tabwidget_stackedwidget.ids_heron_SessionStatusWidget.ids_heron_AlarmsWarningsWidget.TableWidget
(Sys.Process("RockSpotControllerGUI").QtObject("ids::heron::HeronGUI", "", 30).QtObject("QTabWidget", "", 3).QtObject("qt_tabwidget_stackedwidget").QtObject("ids::heron::CentralWidgetSession", "", 1).QtObject("QWidget", "", 1).QtObject("QTabWidget", "", 1).QtObject("qt_tabwidget_stackedwidget").QtObject("ids::heron::SessionWidget", "", 1).QtObject("QTabWidget", "", 2).QtObject("qt_tabwidget_stackedwidget").QtObject("ids::heron::SessionStatusWidget", "", 1).QtObject("ids::heron::AlarmsWarningsWidget", "", 5).QtObject("QTableWidget", "", 1))

 

Any help is really appreciated.

Thanks.

  • We have found a solution.

    For a correct execution of the test it is necessary to do:

    First the Click() method on the qt_scrollarea_viewport to focus the table and  after the ClickCell() method to target row.

     

    Thank you so much to everyone.

     

     

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    If you record a test and do the same steps manually, do you still see the error?

    • Emanuela's avatar
      Emanuela
      New Contributor
      Yes. I tried to use a selectRow() method and with it the problem doesn't occur but I need to a click action.
       
      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        So you recorded a test and it gave you a selectRow and that works if you run that recorded test again?

         

        If that's true, then why not put a selectRow in your test before the click that you need?  Perhaps that will give the correct focus on the object.