When trying to use setcelldata on ultragrid i get a message "The supplied UltraGridRow argument [0] is not one of the expected type(s) : String or Int16" - i saw a similar problem in this threadhttps://es.infragistics.com/community/forums/f/test-automation-for-micro-focus-uft-windows-forms/22461/how-i-get-value-as-text-with-getcelldata-in-swftable#82082
but cstr did not help
record brought the following code:
SwfWindow("win1,").SwfTable("SwfTable_2").ActivateCell "0","psv_msr"SwfWindow("win1,").SwfTable("SwfTable_2").DoubleClickCell "0","psv_msr"SwfWindow("win1,").SwfTable("SwfTable_2").SetCellData "0","psv_msr","100"
replay double clicked the cell but did not fill it, I noticed you had an old bug that might be relevant
https://es.infragistics.com/community/forums/f/retired-products-and-controls/22550/get-a-selected-value-of-a-cell-in-a-ultragridweb
any help would be appreciated
Amitai
(using QTP 11 with TA version free (10.3)
Hi Sanjeev,
Now I am curious, in my initial attempts at determining compatibility with LeanFT I was not able to get it to incorporate it with LeanFT. Granted that was on the initial release of LeanFT, they may have since patched it. Since then I relied on HP's developers on their determination of if they support custom proxies. But each time I asked they said no, and it wasn't really on their backlog. I am curious how you were able to implement it. That said, the issue above should only happen in TA 14.2 and below, since then we modified the cast to allow for Int32's, for earlier versions you just need to cast the value to an Int16 or a short, and it should work.
Hello,
Is there any support for the below issue? Table.activateRow(1)
com.hp.lft.sdk.GeneralReplayException: IG : The supplied UltraGridRow argument [1] is not one of the expected type(s) : String or Int16
We are using LeanFT with infragistics add-on for UFT. Appreciate your help.
Not sure if the previous post helped or not, but looking at your code and the source code I cannot see how DoubleClickCell would work and SetCellData wouldn't with the exception that you posted. The both call the exact same internal methods to get the cell object, and the exception that you have listed if it fired for SetCellData, there is no way it shouldn't have fired the same way for DoubleClickCell. Is the snippet that you posted exactly as you have it in your script that is failing or is this a cleaned simplified summation for the Forum post? Perhaps there was something left off in the translation that would give me a better idea why the script is behaving as it is?
I had a similar issue. I used this to resolve:
For i=0 to RowCount Print i CellData = SwfWindow("G2").SwfWindow("Accounts").SwfTable("navGrid").GetCellData(CInt(i),2) If CellData =ID Then 'activate the row for the matching ID SwfWindow("G2").SwfWindow("Accounts").SwfTable("navGrid").ActivateRow(CInt(i)) Exit for End Ifnext