Highlighted
Valued Contributor.
Valued Contributor.
186 views

Checkbox within swftable gets ticked by UFT but does not save to database

Hi,

I have a regression script which has been working for years but in the past few weeks my script now fails. This is because the ticks to the boxes in my software by UFT set by .setcelldata do not seem to be registering correctly with the application. Weirdly, the ticks show on the screen when UFT selects them but there are also counts on screen which should update after every click but the click doesnt seem to register. On saving the on screen form after UFT has ticked the checkboxes, then the ticks are not saved to the database either.... When i use the mouse in the application it works as expected but its just when UFT ticks the checkboxes that the problem occurs. The code is below:

intGridRowCount = SwfWindow("Control").SwfWindow("Letting Breaks").SwfTable("dgSubletPackages").RowCount

= 0

Do Until i = intGridRowCount - 1
    i = i+1
    blnCapReached = SwfWindow("Control").SwfWindow("Letting Breaks").SwfTable("dgSubletPackages").GetCellData(i, "Cap Reached")
        IF blnCapReached = 0 THEN 
         SwfWindow("Control").SwfWindow("Letting Breaks").SwfTable("dgSubletPackages").SetCellData i,"Let",True
        Else
        End if 
loop

 

I have also tried using .ActiveCell which DOES work as per using the mouse BUT after clicking about 10 checkboxes then UFT crashes on me, so i cant use that function. I have also spoke to the developer of the application who has assured me there have been no changes to the objects in the application in the latest release i a currently testing on.

Any ideas would be great.

Thanks

 

Phil

Labels (3)
0 Likes
1 Reply
Highlighted
Valued Contributor.
Valued Contributor.

I have coded around this by just calling the arrow keys to navigate the rows and .type " " to tick the checkboxes. Would still be interested to know why the SetCellData i,"Let",True failed on such a simple process though...

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.