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
Object reference not set to an instance of an object


I'm new to this so sorry if I ask a basic question.

I'm using

UFT version 12.52

Infragistics Windows Form Test Automation for HP Unified Functional Test Software 2017.0

I need to select a checkbox in the first column and first row of a UltraWinGrid.UltraGrid

I'm using following to automate a test script

 SwfWindow("XXX Xuite.NET: XXXX Tool").SwfTable("SwfTable").SetCellData"0","mCheckBox"True

I get 'Object reference not set to an instance of an object' error.

Can you please assist.



  • 21795
    Offline posted

    Hello Usman,

    You are on the right path. To check the check box put the value you are passing, True in this case, in quotes like this:

    [code]SwfWindow("XXX Xuite.NET: XXXX Tool").SwfTable("SwfTable").SetCellData"0","mCheckBox", "True"[/code]

    Nice place to see what the correct syntax is is by recording scripts in UFT. There are several samples provided with Infragistics TestAutomation installation you can play with. More information about these sample you may find in our online help here “Accessing the Samples”.

    Please let me know if any additional questions on this matter arise.