Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
330
Grid Table Function SetCellData Locks both QTP and Application Under Test
posted

Here is my code:

GridDataTableObject.ActivateCell iRow, "CheckedColumn"

GridDataTableObject.SetCellData iRow, "CheckedColumn", "TRUE"

If I put this at the last line of my script, so that QTP exits after this, it will check the checkbox in the column cell fine.

However if I add any other code after this, or if this is part of a QTP RunAction command where I am performing multiple iterations of this script, so that muliple items are being selected and checked back to back, it will lock both the AUT and QTP.  I can launch Windows Task Manager, and end the AUT process, then QTP will release.

High logging in QTP captures nothing.

Parents
No Data
Reply
  • 22852
    Offline posted

    Hello,

    If the grid is on a dialog or a form that is being closed after the value is being set, it is possible that the form is being closed while the cell is still in edit mode and this may cause issue with QTP.  If this is the case, you can work around this by simply activating a row after you call SetCellData.  In that case, you could add the following line of code:

    GridDataTableObject.ActivateRow 0

    If that isn't the cause of the issue and the above doesn't resolve the issue, then you could also test SetInvalidDataCell instead of SetCellData.  This method takes the same parameters as SetCellData, but the way the value is set is different and this may resolve some issues depending on what events your developers have handled.

    Let me know if either of the above two methods resolve this issue or if you have any questions with this matter.

    Alan

     

Children