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)
Hello,
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
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.
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.
Thanks for getting back & this issue in Java. I have already tried the Table.activateRow((short)1); & Table.activateRow((char)1);. The issue is even after casting the variable to int16, the activateRow function internally converts again to int32.
Essentially the reason for that is because you must match the version of IG TestAutomation (TA) to the version of the assemblies in your application. It looks like you have 14.1 control assemblies in your application under test(AUT). So you must use 14.1 TA assemblies. This is because the TA assemblies specifically reference the control assemblies, and they attempt to use the control assemblies that are in your application for those references. If they do not match, you get the in not compatible exception that you are seeing.
As to the original issue, of Table.ActivateRow(1) not working. You should be able to do something like Table.ActivateRow((short)1) The default datatype for a numeric that is not specifically cast into a type, is Int or Int32. There was a limit on Mercury's version of QTP the predecessor to UFT, that it only passed int16 or short values back and forth. Because of that we had that built into our dll's as well. When the last version of that was no longer in service, we swapped out all the remaining int16 references to int32. VBTable.ActivateRow(Convert.ToInt16(1))C#Table.ActivateRow(Short(1));
Let me know if that helps,
getting the below error for Table.activateRow(1)
I tried in the following versions -
Version - 14.1-
Error Info: The supplied UltraGridRow argument [1] is not one of the expected type(s) : String or Int16
Tried casting to 16bit char or 16bit int and it doesn't work.
Version - 14.2 & 17.1
The IG TestAutomation assembly version [14.2] is not compatible with the AUT's IG Control assembly version [14.1].The IG TestAutomation assembly version [17.1] is not compatible with the AUT's IG Control assembly version [14.1].
Appreciate if there is a solution for the above build 14.1 issue(UltraGridRow argument [1] is not one of the expected type(s) : String or Int16) with the fix for HP UFT automation Infragistics add-on that should support application build on 14.1 AUT assembly.
I have LeanFT latest version but not infragistics (using 14.1) and upgrading to latest version of infragistics HP UFT software might help.
I agree, my organization currently use 14.1 and I think it's time to get upgraded to 17.1. Thanks for the information.